| Assign more than 1 attribute a CSS depending on where located in page |
ukgimp

msg:1221794 | 1:55 pm on Jul 26, 2002 (gmt 0) | Hello In an attempt to avoid having tables for a menu on the left of a page I wish to use the "diplay: Block;" and assign it to the "a's" so that all the <a href>'s can just be inserted and the CSS will scroll them down the page. I have managed to figure out how to do this but it assigns this attribute to the whole page and not just the 1 <TD> I am dealing with. Can I assign more than one type. This is the successful code: a { font-family: "Times New Roman", Times, serif; font-size: medium; display: block; color: #0099CC; } Cheers in advance.
|
ukgimp

msg:1221795 | 2:08 pm on Jul 26, 2002 (gmt 0) | Sorry to answer my own post: Figured it out. Assign an id="name" to the element and then call the class you are after class="menu" a { font-family: "Times New Roman", Times, serif; font-size: medium; display: block; color: #0099CC; } #menu a { font-family: "Times New Roman", Times, serif; font-size: medium; display: block; color: #000000; }
|
madcat

msg:1221796 | 3:30 pm on Jul 26, 2002 (gmt 0) | ukgimp - Give this thread a once over too if you haven't already: [webmasterworld.com...] Great methods for organizing your classes/ids and style sheets.
|
Nick_W

msg:1221797 | 3:46 pm on Jul 26, 2002 (gmt 0) | They should also be in there own div which I guess #menu is right? then you can assign classes to the a's like this: a.mainCat:hover { backrgound-color: blue; } a.subCat { background-color: green; } Nick
|
|
|