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 6 of 6

Thread: Css help!

  1. #1
    Regular Coder
    Join Date
    May 2006
    Location
    Canada
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Css help!

    }
    div.box {
    width: 200px;
    border: 1px solid black;
    background: orange;
    }


    </style>
    <h1>Hello Welocme to 123.com </h1>
    <h2>Hello Welocme to 123.com </h2>
    <h3>Hello Welocme to 123.com </h3>
    <p>Rawlijr</p>
    <a href="http://www.thugbattles.com">ThugBattles</a>
    <p>Hello,<span class="aaa">welcome</span>, <span class="aaa">To</span> a site called <span class="aaa">123</span>.</p>
    </body>
    </html>


    what did i do wrong with my style for div. box ?

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    background-color

  • #3
    Regular Coder
    Join Date
    May 2006
    Location
    Canada
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <div class="boks">hey this is a big box this is what i have ?</div>

  • #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
    background: orange; is correct shorthand.

    I'm not really sure what your problem actually is but I can say that div.box applies a style set to any div element with a class of box.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #5
    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
    Lets analyze this a bit. You have this in your CSS
    Code:
    div.box {
    /*CSS stuff*/
    }
    but you posted that you have this
    Code:
    <div class="boks">hey this is a big box this is what i have ?</div>
    boks is NOT box
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post title, question formulation

    Please, next time observe the Posting Guidelines (particularly #2 and #3):
    • formulate a post title that describes the kind and general subject of your question; "Help!!!" does neither.
    • actually ask a question: be clear about what you want to know or have solved; don't just slap a bit of code into a post and expect everybody's magic ball to reveal your question.

    Also, don't post snippets of markup and styles of what you think are the problem areas: tell the whole story.

    As Arbitrator and _Aerospace_Eng_ already mentioned, there's nothing inheritly wrong with your div.box rule, except that it's meant to style a div with a class of "box", which is absent.
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

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