SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Sep 2004
    Location
    Ireland
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why won't my Style Sheet validate?

    Hi,

    I don't understand what's up with my stylesheet! I used the W3C validation tool and got this back:

    http://jigsaw.w3.org/css-validator/v...usermedium=all

    I don't know css well enough to see what's wrong! Please help me.

    Thanks,
    cliff.

  2. #2
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Central Illinois
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have this in your stylesheet:

    Code:
     #bott_links_all a:hover {
    	color: #0066CC;
    	font-size: 10px;
    	position: 576px;
     }
    position:576px is where the validator is choking.

    The position CSS property isn't meant to be a measurement. It's supposed to be one of the following: absolute, relative, fixed or static. Once you've chosen which of those you're going to use, you can then use the top, left, bottom or right properties to specify where the position is.

    I'm guessing what you want would be something more like this:

    Code:
     #bott_links_all a:hover {
    	color: #0066CC;
    	font-size: 10px;
    	position: absolute;  /* Setting the position property */
    	top: 576px;          /* Setting where the element should appear */
     }
    Even if that's not the effect you want, getting rid of position:576px will get your CSS to validate. It won't do anything for you anyway, formatted that way.

    Hope this helps!

    Matthew

    Quote Originally Posted by cliff_ie
    Hi,

    I don't understand what's up with my stylesheet! I used the W3C validation tool and got this back:

    http://jigsaw.w3.org/css-validator/v...usermedium=all

    I don't know css well enough to see what's wrong! Please help me.

    Thanks,
    cliff.

  3. #3
    SitePoint Member
    Join Date
    Sep 2004
    Location
    Ireland
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a million, for some reason I was only looking at the W3C validation report which removed the "position: 576px;" problem - so I couldn't see what was goinr wrong!

    Got it validating fine now

    cliff.


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
  •