PDA

View Full Version : How to make DIV appear inline?



anif
July 20th, 2006, 08:58 PM
Hi, this is mind boggling. I have 3 DIV's inside a wrapper DIV. I want those 3 DIV's to appear horizontally next to eachother inside the wrapper DIV and NOT one under the other. I have the following CSS:

#wrapperA{
position: relative;
display: inline;
left: 0;
width: 100%;
height: 150px;

}

#cal{
position: relative;
display: block;
width: 30%;
height: auto;
}

#ad{
position: relative;
display: block;
width: 30%;
height: auto;
}

#news{
position: relative;
display: block;
width: 30%;
height: auto;
}

this does not seem to be working though, anyone know how to go about this? I also tried a "float: left" in the wrapper DIV instead of "display: inline"...that doesn't work either.

simplistik
July 20th, 2006, 10:27 PM
float: left;

anif
July 20th, 2006, 10:37 PM
I tried this:

#wrapperA{
position: relative;
float: left;
width: 100%;
height: 150px;

}

It is still not displaying inline....not sure why this is, any clues?

ramie
July 21st, 2006, 07:05 AM
loose the position from wrapperA

anif
July 21st, 2006, 07:15 AM
thanks...it is working now!