homepage Welcome to WebmasterWorld Guest from 54.227.20.250
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 246 posted 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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 246 posted 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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 246 posted 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

WebmasterWorld Senior Member nick_w us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 246 posted 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved