SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Crippler

  1. #1
    SitePoint Addict
    Join Date
    Sep 2001
    Location
    London, UK
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Crippler

    I seen a piece of code in the latest .net mag which allows for text rollovers as oposed to image rollovers to conserve bandwidth, my question is is it possible to apply this effect to only a certain part of the page as opposed to the whole one?

    I only want it to effect the links in my menu bar and not everywhere on the page.

    Im also using DW, any ideas anyone?

    The code is this
    <style>
    a:link{font-family: sans-serif;font-size:10px;colour:blue;text-decoartion:none}
    a:hover{font-family: sans-serif;font-size:10px;colour:white;text-decoartion:underline}
    </style>


    This is a link to the page I want to apply it to, http://www.stablewars.com/indextest.htm I only want to apply the rolloevr effect to the menu on the left hand side and not all the links on the page. Not using a frameset.
    stablewars.com - WWF Fantasy Wrestling, It ain't no E-fed!

  2. #2
    No. Phil.Roberts's Avatar
    Join Date
    May 2001
    Location
    Nottingham, UK
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Theres is a way to do it but im not sure it can be done without manually editing the code.

    Here is the CSS:
    Code:
    .nav {
      font-family:verdana, arial;
      font-size:12px;
      color:#000000;
    }
    
    .nav a:link, .nav a:active, .nav a:visited { color:#0000a0; text-decoration:none; }
    .nav a:hover { color:#ff0000; text-decoration:underline; }
    And then in the HTML you would have something like:
    Code:
    <div class="nav">
     <a href="#">Link One</a>
     <a href="#">Link Two</a>
     <a href="#">Link Three</a>
    </div>
    
    <p><a href="#">Link Four</a></p>

    All links inside the 'nav' class block element would have the 'nav' style applied to them, while those outside would not.
    THE INSTRUCTIONS BELOW ARE OLD AND MAY BE INACCURATE.
    THIS INSTALL METHOD IS NOT RECOMMENDED, IT MAY RUN
    OVER YOUR DOG. <-- MediaWiki installation guide

  3. #3
    SitePoint Addict
    Join Date
    Jul 2001
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check this thread in this same forum...

    http://www.sitepointforums.com/showt...threadid=40419

  4. #4
    SitePoint Addict
    Join Date
    Sep 2001
    Location
    London, UK
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply and help, appreciated
    stablewars.com - WWF Fantasy Wrestling, It ain't no E-fed!

  5. #5
    SitePoint Enthusiast allusion's Avatar
    Join Date
    Aug 2001
    Location
    San Francisco, CA
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Something that's neat for CSS text links is setting the width to be 100%, or whatever, and then you get a more familiar rollover. For menus playing with the letter spacing can also have nice effects. Of course NS4 will mangle your pages unless you put the extra CSS effects in an imported stylesheet.


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
  •