<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Farhan Malik</title>
    <description>The latest articles on DEV Community by Farhan Malik (@farhanmalik).</description>
    <link>https://dev.to/farhanmalik</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F947919%2F5d5d56f9-885b-420c-85ed-77ce11a17b89.jpg</url>
      <title>DEV Community: Farhan Malik</title>
      <link>https://dev.to/farhanmalik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/farhanmalik"/>
    <language>en</language>
    <item>
      <title>How to rotate text in 90 degrees with CSS.</title>
      <dc:creator>Farhan Malik</dc:creator>
      <pubDate>Sun, 18 Dec 2022 18:09:58 +0000</pubDate>
      <link>https://dev.to/farhanmalik/how-to-rotate-text-in-90-degrees-with-css-pim</link>
      <guid>https://dev.to/farhanmalik/how-to-rotate-text-in-90-degrees-with-css-pim</guid>
      <description>&lt;p&gt;To rotate text in 90 degrees with CSS, you can use the transform property with the rotate function.&lt;/p&gt;

&lt;p&gt;Here's an example of how you can use it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.rotate {
  transform: rotate(90deg); /* Rotate the text 90 degrees */
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can then apply this class to any element that contains text that you want to rotate, like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="rotate"&amp;gt;Text to rotate&amp;lt;/div&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to rotate the text in the other direction, you can use a negative angle value, like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.rotate {
  transform: rotate(-90deg); /* Rotate the text -90 degrees */
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use the transform-origin property to specify the point around which the transformation should be applied. For example, to rotate the text around its center, you can use the following CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.rotate {
  transform: rotate(90deg);
  transform-origin: center; /* Rotate the text around its center */
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that the transform property is supported in all modern browsers, but it is not supported in Internet Explorer 8 and earlier versions.&lt;/p&gt;

</description>
      <category>documentation</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
