View Full Version : A Div within a Div?

04-19-2009, 08:04 PM
Hello there,

I'm having a little trouble placing a Div tag within a Div, the code I'm using is below. The Div I'm trying to place within an existing one, vanishes once the code is applied.

#wrapper #navbar1 {
background-image: url(../images/Nav.jpg);
background-repeat: repeat-x;
width: 100%;
height: 60px;


#wrapper #navbar1 #navbar2 {
background-image: url(../images/navbar1_03.jpg);
height: 36px;
width: 1213px;
text-align: center;
margin:0 auto 0 auto;
margin-top: 32px;

Is something in here not correct? I've used it rarely but from what I remember it has worked in the past.

Thankyou for your time.

04-19-2009, 08:54 PM
You can have as many nested DIV's as you want.

Do you have a link?

04-19-2009, 09:32 PM
I'm currently using Localhost for my development site, so no real link as of yet. Is there something wrong with my code I posted? Would it be easier to post my entire CSS code for the styling? There isn't much.

04-20-2009, 12:57 PM
The CSS alone is only half the story, that's why I asked if you had a link.