Jump to content

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 post
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> :)

Edited by smiles
Link to post
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.

Edited by thescientist
Link to post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...