Forum Moderators: not2easy

Message Too Old, No Replies

div not showing

         

Shado

12:55 pm on Jun 10, 2010 (gmt 0)

10+ Year Member



Good day all

I'm hoping someone will be able to help me with a div that is not showing as I've been banging my head for 2 days now and can't find the problem.

I have an image (for rounding corners) in a div above my container div which is not displaying in either IE or FF. Now this has worked in a previous page but it's not working now.

Please can you take a look and if you can see the problem steer me in the right direction. I have tried clear:both and a number of other things but it has not resolved the issue. HTML and CSS have been validated.

To avoid a code dump I have only inserted the below code, if you need the full code I can post it.


<div id="wrapper">
<div class="001-box-top"></div>
<div id="container">


#wrapper{
width:780px;
margin: 0px auto;
height: 1090px;
}
.001-box-top {
width:780px;
height:24px;
background: url(images/001-box-top.gif);
float: left;
background-repeat: no-repeat;
}
#container {
height:900px;
float: left;
width: 780px;
}


Many thanks in advance.

PS: I know I'm going to kick myself once the problem is highlighted but for now I am stumped.

alt131

1:39 pm on Jun 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Shado,
Oddly, this is displaying all the way back to ie5 for me. However, it shouldn't - per 4.1.3 of the recommendations [w3.org] css identifiers (eg classes) cannot start with a digit.
A search on something like "valid css class names" will produce ways to get around this if desired - like the person who wanted to use the visual representation of a musical note in musical scores (kinda neat idea ;))

But for ordinary use, changing
[size=3].001-box-top[/size]
to
[size=3].box-top[/size]
or even .box-top-001 works in the last couple versions of winSaf, Op, FF and ie

Shado

1:54 pm on Jun 10, 2010 (gmt 0)

10+ Year Member



You my man have just been bumped up to my hero of the day!

That is exactly the problem :slaps forehead:

Thank you - can't believe I missed that.