Click to See Complete Forum and Search --> : my css is not applying to the span tag


bradleybebad
12-06-2008, 11:49 AM
For some reason my width and height css is not applying to my span tag. Does anyone know why this is? It works for a div, but not for a span.

<style type="text/css">
#products {



border-width:1px;
border-color:#CCCCCC;
border-style:solid;
width:100px; height:100px;

}
</style>



<body>

<p>
<span id="products"></span>
</p>

</body>

Charles
12-06-2008, 01:29 PM
<style type="text/css">
#products {
border-width:1px;
border-color:#CCCCCC;
border-style:solid;
display:block
width:100px; height:100px;
}
</style>

felgall
12-06-2008, 03:40 PM
It would probably be better to just replace the span with a div since display:block vs display:inline is the only difference between their defaults.

bradleybebad
12-06-2008, 07:57 PM
display:inline-block; works the best for because I needed it to display the block and be inline. Thanks for your help!!!

Now we know!