[thelist] CSS: a.class:hover - handeling line breaks

Casey Crookston casey at thecrookstons.com
Mon Jul 28 16:28:45 CDT 2003


Hello all,

I have the following lines:

<a href='page1.asp' class='nav2'>History</a><br>
<a href='page2.asp' class='nav2'>Press Room</a><br>
<a href='page3.asp' class='nav3'>Parent Company<br>C&H Chemical</a><br>

Here's the CSS code:

.nav2 {
 font-family : Arial, Helvetica, sans-serif;
 font-size : 8pt;
 color : #ffffff;
 text-decoration : none;
 padding-left : 12px;
 line-height : 25px;
}

a.nav2:hover {
 font-family : Arial, Helvetica, sans-serif;
 font-size : 8pt;
 color : #000099;
 text-decoration : none;
 padding-left : 12px;
 line-height : 25px;
}

Everything works fine until you get to the last a href, which contains a
<br>.  As you can see in the class definition, this class has a
padding-left.  After the <br>, however, the next line does not indent.  How
can I make this line indent, AND keep both lines within the same <a> tags?

And also, here's one more caviot...  I'd like to keep the two lines "Parent
Company" and "C&H Chemical" together... in other words, no line height
between them?

Thanks,

Casey





More information about the thelist mailing list