Tips for preventing font distortions caused by transform-rotation

I have implemented the transform-rotation property in CSS to rotate a div and use it as fixed Facebook and Twitter links on my webpage. However, I have noticed that this rotation is distorting my current text font. When I remove the rotation, the text returns to its normal appearance. Is there a solution to this problem?

Visit my website here.

The divs I am working with are for social media icons (Facebook and Twitter).

Below is the CSS code for the inner divs:

#facebook,#twitter{
    display:inline-block;
    font-family:"lucida grande",tahoma,verdana;
    font-weight:bold;
    width:125px;
    margin:0px;
}

And here's the CSS code for the social media icons:

#social{
position:absolute;
right:-120px;
bottom:50%;
transform:rotate(-90deg);
-ms-transform:rotate(-90deg); // IE 9 
-webkit-transform:rotate(-90deg); // Safari and Chrome
}

All I want is for the text to appear clear and crisp without any distortion. Is there an alternative method to achieve this effect without impacting the font style?

Answer №1

When an element is rotated, certain web fonts may experience distortion. To resolve this issue, you can try using backface-visibility:hidden. Hopefully, this tip will be helpful to you!

Check out the following example:

.fix-language{
    font-family:"Arial", sans-serif;
position: absolute;
left: -90px;
    top:120px;
transform: rotate(-90deg);
 }
 .fix-language ul{
    list-style:none;
padding:0;
margin:0;
 }
 .fix-language ul li{
    display:inline-block;
margin-right:15px;
 }
 .fix-language ul li a{
    color:$black-color;
-webkit-backface-visibility: hidden;    
backface-visibility: hidden;
display:inline-block;
 }
<div class="fix-language">
<ul>
<li><a href="#">English</a></li>
<li><a href="#">Portugues</a></li>
<li><a href="#">Spanish</a></li>
</ul>
</div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Odd behavior observed in the Android browser while choosing input fields

When stacking modal elements in the Android Webkit browser (tested on versions 2.2, 2.3, and 3.0), strange behavior seems to occur. Take this example: Here, I have a jQuery UI date picker with z-index 200, a gray overlay div covering the entire document w ...

Sending multiple input values using Ajax

Having html input fields named personals, I utilize the [] to allow for multiple inputs with the same name when posting. Previously, I used a standard form submission method and accessed it in my Django backend using getlist('personal[]'). Everyt ...

Text appearing in varying sizes across browsers

I need some help with a coding issue I'm facing. I have a form where one of the inputs is connected to a JavaScript function that updates a div on the page as the user types. However, I want to limit the width of this div to 900px and make sure it onl ...

Tips for concealing overflowing CSS content

How can I prevent CSS content from overflowing? I am trying to display a price tag in the CSS element, but it is protruding out of my card. .content{ content:''; position: absolute; left: 309px; ...

Missing entry in the dropdown menu rather than the intended selection

Within my HTML code, I am using the following structure: <div class="col-md-8"> @*@Html.DropDownList("templateTypes", (IEnumerable<SelectListItem>)ViewBag.TemplateTypes, new { @class = "form-control", ng_model = "currentTemplat ...

What happens when a CSS module is exported as an empty object?

My go-to for creating projects is using TypeScript and create-react-app. I recently incorporated the typings-for-css-modules-loader and dabbled in css-modules as well. { test: /\.css$/, use: [ require.resolve('style-loader'), { ...

Struggling to figure out the method for obtaining css selectors for scraping in scrapy

Struggling with scraping a website and figuring out how css selectors work in Scrapy. The css in question: https://ibb.co/eJeZpb Here are some standard css selectors: .css-truncate-target .message .js-navigation-open time-ago For scrapy, you would need ...

Distinct styling for the start and subsequent lines of an anchor element using ::before pseudo-element

I'm currently working on a project that requires adding a decoration in front of some anchor links (A). Right now, I am using ::before to achieve this. However, there is an issue where some of the links will line-break and the second line and subseque ...

Having trouble with Selenium and Java when sending keys to a text field - no errors though

I am currently using Selenium with Java in Eclipse for automating test cases on a website as a way to improve my skills. Below is the HTML code snippet. https://i.sstatic.net/I2lCP.jpg My project is set up using Page Object Model in Maven, however, I am ...

What is the best way to close the space between a box-shadow and a div background when incorporating semi-transparent rgba() values?

There seems to be an issue arising when applying partially transparent rgba() background-color and box-shadow color values to an element with a non-fixed (percent-based) border-radius. This combination results in a minuscule transparent gap appearing at th ...

Determine the presence of a value within a specific column of an HTML table using jquery

When I input an ID number into a textbox, it shows me the corresponding location on a scale in another textbox. You can see an example of this functionality in action on this jsFiddle: http://jsfiddle.net/JoaoFelipePego/SdBBy/310/ If I enter a User ID num ...

Customizing the active link color in Bootstrap dropdown menus

Is there a way to customize the color and background of an active link in a boostrap's dropdown menu? Despite trying to override bootstrap's @dropdownLinkColorActive and @dropdownLinkBackgroundActive variables, the changes don't seem to tak ...

How can I position a logo slightly off center to the left, rather than all the way to the left?

I attempted to implement this code: <div id="logo" style="background-image: url('http://comprogroup2ict2b.rf.gd/logo.png'); width: 100px; height: 50px; background-size: contain; background-repeat:no-repeat; float: left"> ...

The same HTML/CSS appears with varying appearances

I have encountered an issue where I created two identical pages, with one page calling the other through a link. Surprisingly, my top menubar changes significantly between the two pages, even though the HTML/CSS code is exactly the same. <html> < ...

Carousel is error-free, but the Left/Right Buttons are malfunctioning

My Bootstrap Carousel Buttons are not working correctly. Although the first image is displayed along with the buttons, the image does not change on its own or in response to button clicks. This issue pertains to a web application that I am developing usin ...

Tutorial on making a pop-up appear on click using jQuery

Below are the attempts I have made: Using jQuery: $("#type_name").click(function(){ $("#add_form").fadeIn(1000); $("#involved_name").val(""); positionPopup('#add_form'); $("#involved_name").focus(); }); Usin ...

Adjust the border of the container

Hey there, I'm working with a container element. The .container-fluid is too oversized for my layout, taking up the entire screen and looking awkward, while the .container is too cramped. I've noticed that the margins are quite large, but whene ...

Expanding Images with JQuery Accordion

I'm facing a problem where I need to include accordions on my website with images, but whenever the accordion is opened, the image ends up stretched. Is there a solution to prevent this from happening? Below is the code snippet I am using: [Fiddle] ...

Enhance the appearance of your forms with the "Bootstrap

I'm having trouble with the input-group-addon class. My HTML code is dynamically generated using JavaScript and follows the same structure across different pages. However, it works on one page but not on another. I can't seem to figure out why! ...

Always ensure that three tables are prominently displayed in the center of the webpage's layout

I have been experimenting with CSS to keep an image consistently centered on a webpage. Now, I am looking to add 6 links on each side of the image while still keeping everything aligned in the middle as the page size changes. I'm debating whether I s ...