I have two images next to each other...
image1image2
I enclose image1 in a div layer, and this happens...
image1
image2
Is there a css value I can use to correct this? I have already tried setting the margin, border and padding of the div tag to 0px, but nothing happens.
please please help.
P.s. I use IE6.You'll need to use the float property.
#someDIV {
float: left;
}
.
.
.
</style>
<body>
<div id="someDIV">
<img src=http://www.webdeveloper.com/forum/archive/index.php/"" ... />
</div>
<img src=http://www.webdeveloper.com/forum/archive/index.php/"" ... />For future reference: The problem is occuring because <div> tags are block level elements and therefore go onto a new line by themselves unless otherwise specified. You could also use display:inline on the div tag, but then you lose the ability to specify dimentions for it (as inline elements cannot have dimentions).
image1image2
I enclose image1 in a div layer, and this happens...
image1
image2
Is there a css value I can use to correct this? I have already tried setting the margin, border and padding of the div tag to 0px, but nothing happens.
please please help.
P.s. I use IE6.You'll need to use the float property.
#someDIV {
float: left;
}
.
.
.
</style>
<body>
<div id="someDIV">
<img src=http://www.webdeveloper.com/forum/archive/index.php/"" ... />
</div>
<img src=http://www.webdeveloper.com/forum/archive/index.php/"" ... />For future reference: The problem is occuring because <div> tags are block level elements and therefore go onto a new line by themselves unless otherwise specified. You could also use display:inline on the div tag, but then you lose the ability to specify dimentions for it (as inline elements cannot have dimentions).