Jump to content

Can't center div's


RazvanTM

Recommended Posts

hello. i recentlly started working on a new theme. the problem is i used layers and they are all aligned but way off center ofn different resolutions. I tried using iframe but i can't get to sync the iframe background with the webpage bg. right were the iframe border should be(disabled it). i can't get a good fix on it, if i center it for FF it will be offcenter for opera, IE, avant and chrome, if i fix it for chrome it will be off for the other. the only browser that is consistent and displays it right without any ajutstments is IE.

Someone suggested i use a container but i can't figure out how, it always messes really bad the layout.

any alternatives to this problem ? :-s

 

difference betwen browsers: http://box225.net/main/imagini/iframe.jpg

example iframe: http://box225.net/main/iframe.php

without iframe: http://box225.net/main/index.php

index.php code: http://box225.net/main/text.html

Link to comment
Share on other sites

Well, you can do one thing. But all your divs in a containing div. Set the CSS for the containing div to this:

 

div#container
{
  position:relative;
  width: ___px; //set this to the width of the contained divs, so that it entirely encloses them
  margin:0 auto;
}

 

But that being said, you are better to remove all the absolute positioning, and learn to use floats.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.