SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: .here

  1. #1
    SitePoint Enthusiast JasonRCS's Avatar
    Join Date
    Oct 2003
    Location
    Ohio
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    .here

    I was looking at the tip page and found the tabs using css at:
    http://www.clagnut.com/writings/csstabs/#

    It appears that they are using a class called .here as shown below:
    Code:
     #topnav A.here:link, #topnav A.here:visited {
    	position:relative;
    	z-index:102;
    	background: #BBBBBB;
    	font-weight:bold;
    	}
    Is this a special class that finds the active page? There is no mention of it in the code, nor is there javascript. Just trying to figure out why it works.

    Thank you,
    Jason

  2. #2
    Old Folks 127.0.0.1 pacres's Avatar
    Join Date
    Sep 2003
    Location
    ed.ab.ca.na.ea
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by JasonRCS
    I was looking at the tip page and found the tabs using css at:
    http://www.clagnut.com/writings/csstabs/#

    It appears that they are using a class called .here as shown below:
    Code:
     #topnav A.here:link, #topnav A.here:visited {
    	position:relative;
    	z-index:102;
    	background: #BBBBBB;
    	font-weight:bold;
    	}
    Is this a special class that finds the active page? There is no mention of it in the code, nor is there javascript. Just trying to figure out why it works.

    Thank you,
    It is not a special class, it is refered to in the HTML
    HTML Code:
    	<li><a href="#">Home</a></li>
    	<li><a href="#" class="here">About</a></li>
    	<li><a href="#">News</a></li>
    the .here is simply refering to a css class that is defined called here you could rename this to what ever you wanted, as long as you also change the class name in html source code.

    A.here:hover will override the A:hover settings in this page.

  3. #3
    SitePoint Enthusiast JasonRCS's Avatar
    Join Date
    Oct 2003
    Location
    Ohio
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you, I must haved missed that in the code.
    Jason


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •