August 31, 200818 yr Me again, oh many posts from me lmao. After much reading, I took it to mean you could only use one id is a css page but having read a post about someones css probs, I think I got the wrong end of the stick. Am I right in saying that classes you can use for several elements, where as each id can only be used for one? If this is the case, perhaps by adding my toolbar as an id rather than a class I can get rid of my text decoration?? You can see what I am refering to in my latest post on another topic http://www.webdesignerforum.co.uk/index.ph...ost&p=75656. Cheers!
August 31, 200818 yr Yes, a class can be used multiple times, whereas an ID is a one-time only thing (eg. header div on a page). You target a ID div in the CSS using # and a class using the . - eg. #header or .comment. As per your question on the thread you linked, you should try wrapping the header in an id, and the nav in it's own div too. Also wrap the entire page in a pagewrap div too. You don't have to, but it makes it easier to centre entire page or move it over to the left if you want etc. <div id="pagewrap"> <div id="header"><h1>My Website</h1></div> <div id="navigation"> <ul class="toolbar"> <li><a href="index.html">Home</a></li> <li><a href="meettheteam.html">Meet The Team</a></li> etc. </ul> </div> </div> To change the text decoration of the links you then target links in the navigation (so it can look different from other links if you like)... div#navigation a { text-decoration: none; color: #330000; } div#navigation a:hover { text-decoration: underline; color: #F5CE0A; }
August 31, 200818 yr Author Thanks so much...it worked. Lol now I just need to figure the rest out!!!
Create an account or sign in to comment