Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: CSS strict implementation (Quick Check)

  1. #1
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default CSS strict implementation (Quick Check)

    Hi all,

    Any help would be great. It's hard to find good info on strict css; well for me anyway

    Whats wrong with the below code? Anything?

    Code:
    .skin0{
     position: absolute;
     cursor: default;
     z-index: 50;
     visibility: hidden;
    }

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No, nothing, although you might want to insert a space before the {: I think there's a bug that occasionally affects one of the earlier versions of IE if you don't.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default Just...

    How the hell do you know stuff like that!
    Thanks anyway.

  4. #4
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default OK, I lied

    Its actually part of a bigger problem, but I didn't want to bog anyone down with my stupidity.

    I just changed to a strict web page and I'm having problems.

    Any help as to why my right-click menu doesn't work?

    Does strict also apply to javascript?

    Know any decent references for strict authoring?

    Thanks

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Changed to strict from what? Transitional or quirks? DOCTYPE does affect javascript. One of the two most common ways is that you may be required to specify units for pixels in about any DOCTYPE, also the way IE gets the body element in certain scripting situations changes when changing from quirks to a valid DOCTYPE.

    Differing DOCTYPE's will cause markup to render differently in many cases. Where javascript is dependant upon markup, this can mess up a script.

    Additionally, anything that is invalid in a given DOCTYPE, whether it is hard coded or created by a script can cause problems.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default ty

    Thanks for the pixek thing. As fir the rest i will work through my code and sort it out (I went from transitional)

  7. #7
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    If you use a DOCTYPE, use the w3c validator to check it. It will tell (mostly) what's wrong and about where to find it on your page:
    http://validator.w3.org/
    - Mike

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by mburt View Post
    If you use a DOCTYPE, use the w3c validator to check it. It will tell (mostly) what's wrong and about where to find it on your page:
    http://validator.w3.org/
    Generally that will only help to fix hard coded HTML and can often generate erroneous error reports for on page scripts as well as miss errors in any script generated HTML.

    It is still a good idea but, best to know its limitations.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    can often generate erroneous error reports for on page scripts
    Not erroneous. The things the validator reports are indeed invalid.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    Not erroneous. The things the validator reports are indeed invalid.
    Not for on page scripts. It will erroneously report that tags which are 'not open' are being closed. However, since these tags are themselves within script tags, they are not tags, they are code. Or, if looked at as the strings that they are, usually do have opening tags that the validator is ignoring. Either way it is a goof of the validator.

    This is why scripts generally should be made external for validation.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •