Link styles with CSS

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Link styles with CSS

    Hi there,

    Please have a look at the site I'm currently working on:
    [url]http://www.team-o.org[/url].
    I am using CSS for virtually everything you see on the page. But how can I
    make the main navigation buttons to stay orange when a page is selected?


    Tintin81 Guest

  2. Similar Questions and Discussions

    1. #24095 [Com]: phpinfo styles override page styles and damage appearance
      ID: 24095 Comment by: joe at monkeydepartment dot com Reported By: generic at thetahat dot com Status: Open...
    2. css link styles don't work
      Hi-I've made a css style that is supposed to make links and visited links on the main part of my page one color and the links and visited links on...
    3. Different Link Styles on same page
      I would like to have two different Link Styles on the same page - in the center table I have Bold and RED links but farther down I would like to...
    4. link font styles with db
      I'm having a problem with the links that I have set up. I have anchor tags on column headings from a database that users can sort by. The sorting...
    5. Problem using different a:link CSS styles in Template
      Is it possible to use more than one CSS for hyperlinks on a template based page. I'm trying to have different hyperlink properties on the same page....
  3. #2

    Default Re: Link styles with CSS

    Add a unique identifier to each button -

    <li><a href="home.htm" id="button1">Home</a></li>|
    <li><a href="services.htm" id="button2">Services</a></li>|
    <li><a href="about_us.htm" id="button3">About Us</a></li>|
    ...etc.

    Add an embedded rule to each page -

    #nav A#button1, #nav A#button1:active, #nav A#button1:focus {
    COLOR: #f90
    }

    Modify the button number to suit.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "Tintin81" <webforumsuser@macromedia.com> wrote in message
    news:ddqsge$gbn$1@forums.macromedia.com...
    > Hi there,
    >
    > Please have a look at the site I'm currently working on:
    > [url]http://www.team-o.org[/url].
    > I am using CSS for virtually everything you see on the page. But how can I
    > make the main navigation buttons to stay orange when a page is selected?
    >
    >

    Murray *TMM* Guest

  4. #3

    Default Re: Link styles with CSS

    Hey Murray,

    Great stuff! Thanks for your help. I've changed everything as recommended!

    Tintin81 Guest

  5. #4

    Default Re: Link styles with CSS

    You're welcome....

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "Tintin81" <webforumsuser@macromedia.com> wrote in message
    news:ddsgb5$kip$1@forums.macromedia.com...
    > Hey Murray,
    >
    > Great stuff! Thanks for your help. I've changed everything as recommended!
    >

    Murray *TMM* Guest

  6. #5

    Default Re: Link styles with CSS

    Hello y'all,

    Loved your Team O. Design site, great look and most professional. :-)

    I've got another approach that works well for me. I think it was Dan Cederholm
    who pointed this out, in his wonderful book "Web Standards Solutions: The
    Markup and Style Handbook ISBN = 1-59059-381-2. See page 228 - 231:

    First give your body an ID, example <body id="home">

    Then mark-up your NavBar so:

    <li><a href="index.php" class="home">Home</a></li>
    <li><a href="teach.php" class="teach">Teaching</a></li>
    <li><a href="community.php" class="comm">Community</a></li>
    <li><a href="family.php" class="fam">Family</a></li>

    Then your syle sheet goes:

    #home a.home, #teach a.teach, #comm a.comm, #fam a.fam {
    color: #FFE680;
    background-color: #BF8660;
    }

    You get your link effect only when the body ID and the a.class combination
    result.

    Advantages:
    Less mark-up
    can use the classes on other links on the page,
    can use <body id="teach"> on all sub-pages related to that sub-category of
    pages
    you can use an include so that your NavBar is edited once, and styles the
    links exactly where and when you need, you ner have to touch the navbar again!

    See two examples at [url]http://www.rjwconsulting.org[/url] and [url]http://www.mrwteaches.net[/url]

    Dan Cederholm also does some really nifty stuff with columns in that same
    chapter 15 "Styling <body>" where he uses it to dynamically style a page to two
    and three columns. That's for another day! You might visit
    [url]http://www.friendsofed.com/books/1590593812/[/url]

    Regards,
    Rich
    :heart;

    RichW Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139