Jump to content

Navigation problem


RizwanAhmedMemon

Recommended Posts

I have a problem in navigation bar I have made a horizontal navigation bar same navigation I have kept in vertical also but I want to have my vertical one a different formating. But I can't give it different formatting because in my external style sheet I have given formatting which applies on my "a href" element. Since the vertical navigation is also made using "a href" so it is also getting the same formating as I have given to my horizontal navigation bar. How can I get out of this problem and can make my vertical navigation bar different by giving it different formatting?

Link to comment
Share on other sites

Hi! Nesting selectors may help u, like this example <html><head><style type="text/css">p a {color:red;}span a {color:green;}</style></head><body><p>This is a <a href="....">link</a> within a paragraph element.</p><span>This is a <a href="....">link</a> within a span element.</span></body></html> :)

Link to comment
Share on other sites

please explain questions by providing code and or links to the code, but this is probably just a simple case of how well you uze your CSS selectors.

Link to comment
Share on other sites

I may be wrong here, but I would suggest nesting all of your links inside a list (<ul></ul>). I would use ID selectors to define differences between the horizontal and vertical navigation, and all of the generic properties for each link can be defined using classes? ( eg .navigationLinks a {color:#ffffff;} ) I would avoid using selectors for href's and where possible use the full address to elements, eg. #navigationHorizontalBar ul li a {} Thoughts anyone?? :Pleased: James

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...