SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    links and layout in css

    I am laying out a home page using css.
    http://www.clickbasics.com/lab/my_home_page.html

    I would like to incorporate link information in the same definition that I use for the layout. However, for the moment the only way I can get links to behave is by using multiple definitions for the layout and the links.

    In the css:
    /* topnav styles */
    #topnav {
    padding: 2px;
    background-color: #000000;
    width: 744px;
    height: 5px;
    color: white;
    text-align: center
    }

    /* topnav links */
    #topnav a {color:#FFD700}
    #topnav a:hover { color:#FFD700}
    #topnav a:visited {color:#FFD700}
    #topnav a:active { color:#FFD700}

    and in the home page body:
    <div id=topnav>
    Link #1&nbsp;&nbsp;
    Link #2&nbsp;&nbsp;
    Link #3&nbsp;&nbsp;
    </div>

    Is there any way of incorporating the links definitions within the same bracketed definition as padding, background-color, etc.?
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    From my experience, it's not really possible any way other than what you've done, aside from defining ALL links in the same manner (which you probably don't want).


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
  •