www.webdeveloper.com
Results 1 to 11 of 11

Thread: Link Mouseover help.........

  1. #1
    Join Date
    May 2005
    Location
    Pangea
    Posts
    668

    Question Link Mouseover help.........

    Hi! I am in need of CSS help....
    I need a css script that will make all the links in a page:
    -Not underlined
    -Underline when mouse overed and turns red

    I can already do this, but I use 2 scripts and I'm worried this will cause
    conflict within the page. Can anyone do this with 1 script?
    Here is my website that uses these two scripts at once. It works, but I
    just want 1 script for peace of mind............
    www.team847.com

    Thanks!

  2. #2
    Join Date
    Dec 2002
    Location
    Manchester, UK
    Posts
    6,275
    Just put this code somewhere in the head section of your page:
    Code:
    <style type="text/css"><!--
    
    body{
      background-color:#000000;
      color:#efba03;
    }
    
    a, a:link, a:visited{
      text-decoration:none;
      color:#ffa000;
    }
    
    a:focus, a:hover, a:active{
      text-decoration:underline;
      color:#ff0000;
    }
    
    --></style>
    And delete all of this code:
    Code:
    <style>
    a:hover{color:red; text-decoration:underline; }
    </style>
    
    <STYLE>A {
    	TEXT-DECORATION: none
    }
    </style>
    
    bgcolor="#000000" text="#EFBA03" link="#ffa000"
    vlink="#ffa000" alink="#ffa000"
    Even better, you could put the code at the start into an external style sheet and just reference that from each of your pages, then one simple change will affect all of the pages on your site. If you want any help with that then let me know and I'll be happy to help.
    Every fight is a food fight when you’re a cannibal.

  3. #3
    Join Date
    May 2005
    Location
    Pangea
    Posts
    668
    WOW! You can do that? An external Style Sheet?!
    That would be awesome and would save me soooooo much time.
    I'm redesigning that website,
    www.team847.com/NEW.html
    and it would be a great idea to do CSS externally.
    How do you do that?
    **(o)>***<(o)
    ___|| * * *
    *||__ , * * * * * * * * (o)>
    \___/ * * * *\___/ * * * * * * *___//
    iiiiLLiiiiiiiiiiiiiii_/_|iiiiiiiiiii~~~~~~ \___/~~~~~~~~~

  4. #4
    Join Date
    Dec 2002
    Location
    Manchester, UK
    Posts
    6,275
    Save your styles in a .css file and then reference it like this:
    Code:
    <style type="text/css"><!--
    @import "stylesheet.css";
    //--></style>
    Also, since you're doing a redesign, put a DOCTYPE at the top of your page, it keeps the browers out of quirks mode and then they behave a bit better and adhere to the W3C specifications more closely. I'd recommend using the HTML 4.01 Strict DOCTYPE to start off with.
    Every fight is a food fight when you’re a cannibal.

  5. #5
    Join Date
    May 2005
    Location
    Pangea
    Posts
    668
    Soooooo, to do the mouseover links thing, I just cut/paste that cool new script you made as is and that's it?
    It's that simple?

    As for the doctype, where do I put that in the page?
    I use FrontPage 2003, and I've seen that in the open source view.
    (In my new page www.team847.com/NEW.html)
    Should I simply use what FP uses, or should I do what you said?
    Last edited by Sunny G; 05-13-2005 at 07:21 PM.
    **(o)>***<(o)
    ___|| * * *
    *||__ , * * * * * * * * (o)>
    \___/ * * * *\___/ * * * * * * *___//
    iiiiLLiiiiiiiiiiiiiii_/_|iiiiiiiiiii~~~~~~ \___/~~~~~~~~~

  6. #6
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    As for the doctype, where do I put that in the page?
    The doctype should be the first line in the page.
    Should I simply use what FP uses
    Almost never.
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  7. #7
    Join Date
    May 2005
    Location
    UK
    Posts
    18
    Using Page View>Code Snippets add this new item

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

    or, as I have in my Code snippits- just so that I don't forget anything, as much as to save time-

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>here</title>
    <link rev="made" href="mailto:" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="author" content="" />
    <meta name="description" content="here" />
    <meta name="keywords" content="" />
    </head>

    You can make your own for HTM Strict, Transitional, Frameset etc. and just press C+Enter to get to it when you are on a new page ( removing what FP may have put there, of course. )

    FP2003 really is a great improvement on it's previous incarnations. In addition, if you are using Firefox I recommend getting the Web Developer with HTML Tidy extension. This will really help you with tidying up your code.
    Last edited by speedbird; 05-15-2005 at 05:53 AM.

  8. #8
    Join Date
    May 2005
    Location
    Pangea
    Posts
    668
    Cool! That will come in handy!
    Thanks!
    **(o)>***<(o)
    ___|| * * *
    *||__ , * * * * * * * * (o)>
    \___/ * * * *\___/ * * * * * * *___//
    iiiiLLiiiiiiiiiiiiiii_/_|iiiiiiiiiii~~~~~~ \___/~~~~~~~~~

  9. #9
    Join Date
    May 2005
    Location
    Pangea
    Posts
    668
    Wow, I forgot about this thread... Now I am using an external style sheet and had a little tiny question... I want to use the font Arial for my site but the validator doesn't like it for some reason... It says I need to use some generic family thing. I have seen something like this before, but I don't know what I need to type for that. It just lists fonts seperated by commas. Could someone show me how to do this?
    Pretty Please?
    **(o)>***<(o)
    ___|| * * *
    *||__ , * * * * * * * * (o)>
    \___/ * * * *\___/ * * * * * * *___//
    iiiiLLiiiiiiiiiiiiiii_/_|iiiiiiiiiii~~~~~~ \___/~~~~~~~~~

  10. #10
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    font-family: arial, sans-serif;
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  11. #11
    Join Date
    May 2005
    Location
    Pangea
    Posts
    668
    Cool! Thanks!
    **(o)>***<(o)
    ___|| * * *
    *||__ , * * * * * * * * (o)>
    \___/ * * * *\___/ * * * * * * *___//
    iiiiLLiiiiiiiiiiiiiii_/_|iiiiiiiiiii~~~~~~ \___/~~~~~~~~~

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles