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

Steve Lewis nepolon at worlddomination.net
Mon Jul 28 16:48:22 CDT 2003


Casey Crookston wrote:

><a href='page3.asp' class='nav3'>Parent Company<br>C&H Chemical</a><br>
>  
>

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

>can I make this line indent, AND keep both lines within the same <a> tags?
>  
>
I'm not the CSS mastah, but this looks like default behavior for inline 
elements, and <a> are inline elements.
If you want that kind of padding you might look at adding "display: 
block" to your CSS. This should also allow you to remove the <br>s that 
appear at the end of your lines.

>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?
>  
>
I'm a little confused by this, but it sounds to me like you want to 
change your "line-height" to an element "height" or a "padding-bottom" 
or something.  line-height is intended to put space between lines of 
text; if that isn't what you want than take it out and use a more 
appropriate attribute to space out your navigation items.

hth
Steve



More information about the thelist mailing list