PDA

View Full Version : Spacing Issues with Divs



P.A.K.
01 Jul 2009, 11:04 AM
'm stuck guys: I'm doing a site in ASP. The body area consists of 3 parts arranged horizontally

Part A is pictures
Part B is in the middle with text
Part C is pictures again

They are all contained withing another "body" div

I got them all aligned properly in IE, but in FF and Chrome Part C displays below Parts A+B, to the rights side of the screen.

any help? I hate these differences between browsers

Skitrel
02 Jul 2009, 10:27 AM
Common problem with formatting in any website regardless of what code you're using. You need to lock them in place.


I know of a couple of solutions:


<style type="text/css">
<!--
DIV.50x50 {
position: absolute; // Keeps box in place
left: 100px; // How far from left you want it
top: 100px; // How far from top you want it
}
//-->
</style>
<div class="50x50"></div>

OR:


<div style="position: absolute; left: 100px; top: 100px;"></div>

Hope this helps.