Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member toadeny's Avatar
    Join Date
    May 2003
    Location
    Wellington, New Zealand
    Posts
    188
    Member #
    1426
    I just got stuck on this css problem.

    i got my site right .

    http://www.unleashed.co.nz/

    top right navigation, i want that to be black text on link and visited with no underline, when hovered i want it to underline.

    SIMPLE, right ?

    here is my css
    Code:
    <a href="index.php?s=&pageid=2">Portfolio</a>
    </span>&nbsp;-&nbsp;&nbsp;<span class="mainl">
    <a href="index.php?s=&pageid=3">People</a>
    </span>&nbsp;-&nbsp;&nbsp;<span class="mainl">
    <a href="index.php?s=&pageid=6">Unleashed
    and then that pulls back to the .css file
    unleashed.css in the root, which contains:

    Code:
    .mainl a:link {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	text-decoration: none;
    	color: #000000;
    	font-size: 10px;
    }
    .mainl a:hover {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	color: #FF0000;
    	font-size: 10px;
    	text-decoration: underline;
    
    }
    .mainl a:visited {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	color: #00FF00;
    	text-decoration: none;
    	font-size: 10px;
    }
    now tell me, what is going on here. i have had these probs before, seemed to work until now on other sites.
    i know there is issues with css inside links, but css works outside links.

    blah, can anyone tell me what i need to do. i'm sure the css is fine, it appears exactly how i want it in dreamweaver, yes , i have uploaded all the files.

  2.  

  3. #2
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    you must put the class within the <a> tag for the hover to work.
    JR

  4. #3
    Senior Member toadeny's Avatar
    Join Date
    May 2003
    Location
    Wellington, New Zealand
    Posts
    188
    Member #
    1426
    Originally posted by JR
    you must put the class within the <a> tag for the hover to work.
    is this the correct way to dictate css styling with seperate classes ?
    .mainl a:link {blah blah blah}

    cause i dont want to do a plain
    a:link {blah blah blah}

    honestly, i have used it like that way before, and it did NOT work.

  5. #4
    Senior Member toadeny's Avatar
    Join Date
    May 2003
    Location
    Wellington, New Zealand
    Posts
    188
    Member #
    1426
    never mind, thanks for your help, i have solved the problem by looking at another site. For me having the style sheet values external is no better than internal, internal is the only way i can get it too work, my site anyway is basically ones page called index.php and each other page is loaded from a database via a code ?s=&pageid=xx (xx=pageid) and so a internal is fine, it loads once.

  6. #5
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    this is the best way

    Code:
    a:link, a:active, a:visited {
    normal link properties
    }
    
    a:hover {
    normal link hover properties
    }
    
    a.link1:link, a.link1:active, a.link1:visited {
    link1 properties
    }
    
    a.link1:hover {
    link1 hover properties
    }
    Code:
    <a href="whatever">Normal Link</a>
    <a href="whatever" class="link1">Link1 Class</a>
    JR


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:53 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com