Forum Moderators: not2easy

Message Too Old, No Replies

text-indent problem

text-indent problem

         

WxGuy1

6:56 am on Nov 20, 2003 (gmt 0)



Hello all...
I'm learning CSS and am currently in the process of converting my table-rich pages to CSS. At any rate, I'm having a problem with the text-indent attribute.
Here is my .css declaration:
{The relevant parts are bolded}


p {
font-size:1em;
margin-left:20px;
width:690px;
top:0px;
}

.log {
text-indent:20px;
}

Here is an example of where I want to use it:


<p>Total Distance: ~500 miles <br>
Target Area / Chase Area: Between Gage, OK, and I-40 near the OK/TX border
<br> Watches: <a href="javascript:openWindow( '041503ww.html', 600, 500 ,1 ,1 ,20 ,20 )"><span class="tornado">Tornado Watches 118, 120, 123, 124,
125, </span></a>
<br> Mesoscale Discussions (MCDs): <a href="javascript:openWindow( '041503mcd.html', 650, 500 ,1 ,1 ,20 ,20 )">459, 461, 463, 466, 468, 472, 473, 474</a><br>

<span class="log">A rather potent day was forecasted. A very strong upper ... </span></p>

When I do this, however, it doesn't do a text-indent. I've tried doing just a <style="text-indent:20px;">, but that doesn't work either. I've tried 'em' and other measurement units but to no avail. If you want to see this in action go to [tornadocentral.com...] >> Storm Chasing >> 2003. I want the first line of each of the narrative sections to be indented... Any suggestions? As I said, I'm just a beginner at this so I'm sure I'm breaking some rule somewhere... Thanks!

Jeff

dcrombie

10:02 am on Nov 20, 2003 (gmt 0)



text-indent only works on the first line of a "block" element (ie. a paragraph). CSS doesn't recognise <BR> as the end/start of a block element. If you want the effect you describe then you have to mark each paragraph up as <P>...</P>.

;)