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

Casey Crookston casey at thecrookstons.com
Mon Jul 28 17:02:26 CDT 2003


----- Original Message ----- 

> <div id="nav">
> <a href='page1.asp'>History</a><br>
> <a href='page2.asp'>Press Room</a><br>
> <a href='page3.asp'>Parent Company<br>C&H Chemical</a><br>
> </div>
> 
> Now you can style the links using:
> 
> div#nav a {
>   /* css rules here */
> }
> 
> Which will style them all without you having to add classes to each
> one. You don't have to surround them with a div with an id - if they
> are already surrounded by some other element (a table cell for
> example) you can add an ID to that.


Great trick!  Okay, so now I have:

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

and this:

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

Two questions: it now renders like this (hope the spacing works):

     History

     Press Room

     Parent Company

C&H Chemical


What I'd like is this:

     History

     Press Room

     Parent Company
     C&H Chemical

Does that make sense?

Thanks,

Casey








More information about the thelist mailing list