Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css text-indent equivalent on the right side

Tags:

I have right-side aligned text and I want it to push it a little bit left like you do with text-indent bur on the right side. Any solution with that? I've been trying with margin, but IE9 doubles the margin on the first menu item (?).

Heres the css:

h99 { padding: 0px;     font-family: lucida, sans-serif;     font-size: 16px;     font-weight: bold;     line-height: 40px; }  #menublock { width: 230px;     height: auto;     float: left;     text-align:right;     margin-right: 0px; }  ul { list-style-type: none;   margin:0;   padding:0;   overflow: hidden; }  ul a:link, ul a:visited { display: block;   width: 210px;   background: transparent;   text-align: right;   text-transform: uppercase;   text-decoration: none;     height: 40px;     color: #ffffff;     padding: 0px;     margin: 10px; }  ul a:hover, .selected { background: #484848 !important;   color: #ffffff !important; }  

The menu is a simply horizontal one.

like image 570
Matti Avatar asked Aug 10 '12 22:08

Matti


People also ask

How do I indent text to the right CSS?

You can use the CSS text-indent property to indent text in any block container, including divs, headings, asides, articles, blockquotes, and list elements. Say you want to indent all div elements containing text on a page to the right by 50px. Then, using the CSS type selector div, set the text-indent property to 50px.

What is CSS text-indent?

Definition and Usage. The text-indent property specifies the indentation of the first line in a text-block. Note: Negative values are allowed. The first line will be indented to the left if the value is negative.

How do you do a hanging indent in CSS?

Hanging Indent Method 1: HTML-OnlyAnd the style attribute value “text-indent: -36px” shifts the first line of the paragraph to the left by 36 pixels (hence the negative value of -36px). You can easily modify the degree of indenting by modifying the values of these two numbers.

How do I indent right in HTML?

You can also use an em space when defining the width of an indent. You can also change the from a left indent to a right indent by changing margin-left to margin-right.


1 Answers

There is none, unfortunately there is no text outdent in css, hower, you could use text direction direction:rtl; for some short texts, in that way indent will appear on the other side.

like image 160
Cyber Avatar answered Sep 18 '22 16:09

Cyber