[CSS21] [css3-text] [css3-tables] text-indent percentages

Posted in dotnet, vb, vb.net | No Comments »

The CSS2.1 spec says that text-indent percentages are relative to the containing
block width, not the block element's width. I guess the goal was to allow use of
margins + negative text indent for hanging indents, but this has some rather...
odd implications for inline blocks and table cells.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title>Blank page</title>
<style>
   body {
     border: dotted thin silver;
   }
   table {
     border-spacing: 0;
   }
   .test {  width: 100px; text-indent: 50%; border: solid thin gray}
</style>
<table>
   <tr> <td class="test">T
</table>
<p><span class="test" style="display: inline-block">T</span>

Given that padding behaves the same way, though, perhaps it's best to define
the containing block of a table cell by splitting the table cell into two
boxes at the padding edge and having the outer one be the containing block
for the inner one.

And I'm wondering whether CSS3, which has explicit support for hanging indents,
should allow for using percentages of the ele

Similar:

  1. Interaction of text-indent, ::first-letter and float The interaction of text-indent with floated ::first-letter is currently specified in a way that creates unexpected results. The issues I see can be demonstrated using...
  2. Create text indent over more than 1 line Hi I need to create a text indent on a paragraph that clears a logo. The paragraph is 10 line with the line height set...
  3. [CSS21] ‘overflow’ and CB Just came across with this post: <http://translate.google.co.jp/translate?u=http://tomato.myftp.org/blog/readone.php%3Fid%3D105&sl=ja&tl=en> The guy who wrote it wonders if there's a contradiction in CSS 2.1. 1. In "11.1.1 Overflow: the...
  4. [CSS21] ‘overflow’ and CB Just came across with this post: <http://translate.google.co.jp/translate?u=http://tomato.myftp.org/blog/readone.php%3Fid%3D105&sl=ja&tl=en> The guy who wrote it wonders if there's a contradiction in CSS 2.1. 1. In "11.1.1 Overflow: the...
  5. text wrapping anchor I have an ol with a li inside and inside of that have an a element. There is a fixed width on the ol and...

Leave a Reply