View Full Version : Css help!

05-08-2006, 08:13 PM
div.box {
width: 200px;
border: 1px solid black;
background: orange;

<h1>Hello Welocme to 123.com </h1>
<h2>Hello Welocme to 123.com </h2>
<h3>Hello Welocme to 123.com </h3>
<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>

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

05-08-2006, 08:16 PM

05-08-2006, 08:21 PM
<div class="boks">hey this is a big box this is what i have ?</div>

05-09-2006, 12:42 AM
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.

05-09-2006, 02:16 AM
Lets analyze this a bit. You have this in your CSS

div.box {
/*CSS stuff*/
but you posted that you have this

<div class="boks">hey this is a big box this is what i have ?</div>
boks is NOT box

05-09-2006, 09:16 AM
Please, next time observe the Posting Guidelines (http://www.codingforums.com/postguide.htm) (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.