Welcome to WebmasterWorld Guest from 54.161.64.174

Forum Moderators: not2easy

Message Too Old, No Replies

how to differentially set link styles?

     
10:20 pm on Feb 22, 2003 (gmt 0)

10+ Year Member



Does anybody know how to have a page where for example

links (a href=...) in a menu bar are NOT bold and 10pts BUT

links in say a table or somewhere else on the page are BOLD and 11pts.

If i define the link or a tag, it seems to be global for the whole page...thanks

10:30 pm on Feb 22, 2003 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Two approaches come to mind:

1. Create a class (let's call it "nav") and apply that class just to the anchor tags that you choose <a href="page.htm class="nav">TEXT</a>

a.nav { -- rules -- }
a.nav:visited { --rules-- }
a.nav:hover { -- rules -- }

2. If all of one style of link will be within a div (say its ID is "navi"), then declare some rules for any anchor tags that are child elements in that div

#navi a { --rules-- }
#navi a:visited { --rules-- }
#navi a:hover { --rules-- }

7:02 am on Feb 23, 2003 (gmt 0)

10+ Year Member



will not the definition of a.link interfere with this since a.link refers to all links on the page? or will a.nav override a.link? I'm kinda new to this, but I'll try it out!
7:18 pm on Feb 23, 2003 (gmt 0)

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



a.nav:link will override a:link .. as long as the rule is specified in a.nav too.

For example, if a:link has a border, not specifying a border for a.nav:link will still give it a border because of a:link. Hence, the a.nav section marks changes to the general anchor section.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month