Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Dec 2006
    Location
    Bahrain
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS and fieldsets--- Explanation needed

    May i ask if we can control the border-attributes of fieldsets...
    e.g.
    Code:
    <style>
    fieldset.1{
    border-top: #c08933;
    border-bottom: #e45f2e;
    bottom-left: #65752e;
    border-right: #08ceff;
    border-width: 1px dotted
    }
    </style>
    Now CAN IT BE???
    ALWAYS remember to validate your code

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Yes you can but class or ids can't begin with numbers or special characters.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <style type="text/css">
    fieldset.one {
    border-top: 1px dotted #c08933;
    border-bottom: 1px dotted #e45f2e;
    border-left: 1px dotted #65752e;
    border-right: 1px dotted #08ceff;
    }
    </style>
    </head>
    
    <body>
    <fieldset class="one">
    This is in a fieldset
    </fieldset>
    </body>
    </html>
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Dec 2006
    Location
    Bahrain
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ty
    ALWAYS remember to validate your code

  • #4
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,387
    Thanks
    32
    Thanked 288 Times in 282 Posts
    Quote Originally Posted by codingmasta View Post
    Code:
    fieldset.1{
    border-top: #c08933;
    border-bottom: #e45f2e;
    bottom-left: #65752e;
    border-right: #08ceff;
    border-width: 1px dotted
    }
    bottom-left isn’t a valid property and you can’t declare a border style via the border-width property.

    Quote Originally Posted by _Aerospace_Eng_ View Post
    Yes you can but class or ids can't begin with numbers or special characters.
    I thought so too, but, after trying to look that up earlier, I don’t see anything in the spec that says that classes can’t begin with numbers. Such a class is also valid according to the W3C CSS Validator.

    The ID is, of course, invalid, though I get some cryptic error message when passing it through the validator:
    In CSS1, an id name could start with a digit ("#55ft"), unless it was a dimension ("#55in"). In CSS2, such ids are parsed as unknown dimensions (to allow for future additions of new units)To make ".1" a valid id, CSS2 requires the first digit to be escaped ("#\31")
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

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