Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: CSS Link tabs

  1. #1
    New Coder
    Join Date
    Oct 2007
    Posts
    86
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Question CSS Link tabs

    Today i have been making a new website and i have created some css tabs user images.

    The first problem is in firefox when you click the tab to activate it, it does not turn black like its supposed when in IE it works fine. Im assume there is something missing from the active link coding.

    Secondly how do i make the Home page tab black(active) when you first go to browse website.

    Please see link http://outdoor-signs.co.uk/

    Here is my css code for the links:

    a {

    width: 78px;
    height: 48px;
    display: block;
    background-image: url(images/navigation_top_04.jpg);

    }

    a:hover {

    width: 78px;
    height: 48px;
    background-image: url(images/navigation_top_03.jpg);

    }

    a:active {

    width: 78px;
    height: 48px;
    background-image: url(images/navigation_top_03.jpg);

    }

  • #2
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


    The first thing you should do is to give the program a DOCTYPE.
    It should be the first line of code above the <html> tag.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #3
    New Coder
    Join Date
    Oct 2007
    Posts
    86
    Thanks
    8
    Thanked 0 Times in 0 Posts
    I know i need to add a doctype. Cheers for that anyway.

    Got any ideas on how to sort the tabs out?

  • #4
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    No. I'm not very used to CSS myself, but I have in my own experience corrected results just by using the right DOCTYPE, so it's well worth doing before you look for any other problems. It tells the browser what versions to interpret.

    The URL in my signature has many sources of help. It might be useful to check there.

    Probably some other coder will help you. There are some extremely good coders here.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.


  •  

    Posting Permissions

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