shachi
08-13-2006, 10:04 AM
Hello all,
I was trying to position a div vertically and horizontally in the center(in all resolutions) but unfortunately due to some reason the div gets far too much to the right even when I place the left positioning 50%.
My code so far is something like this:
<div id="test" style="position:absolute;left:50%;top:50%;height:300px;width:500px;border:1px solid;"></div>
Are there any hacks or tips for this problem?? Any help would be greatly appreciated. Thanks in advance.
I was trying to position a div vertically and horizontally in the center(in all resolutions) but unfortunately due to some reason the div gets far too much to the right even when I place the left positioning 50%.
My code so far is something like this:
<div id="test" style="position:absolute;left:50%;top:50%;height:300px;width:500px;border:1px solid;"></div>
Are there any hacks or tips for this problem?? Any help would be greatly appreciated. Thanks in advance.