Jump to content

Making a div scale with the browser


DeathRay2K

Recommended Posts

Right now I'm using CSS that should work, but doesn't in IE.

#content { position: absolute; width: auto; height: auto; top: 197px; left: 110px; right: 145px }

It's content's width is set to 100%, but still, it should always have 197px left of it and 145px right of it, no matter what size the browser window is, and this works great in Firefox and Opera, but in IE the content stretches it until it is 100% the width of the entire browser window.Is there any way I can get IE to display the same results as Firefox and Opera? Or do need to use (*ugh*) tables?

Link to comment
Share on other sites

i dunno if this solves it but try add

	margin-left: 110px;	margin-right: 145px;

Link to comment
Share on other sites

Yeah, the page is http://www.d2kstudios.com/index.php, and the CSS in questioon is what I posted above.The full CSS for the content div is

	#content { position: absolute; width: auto; height: auto; top: 197px; left: 110px; right: 145px; padding: 10px; background-color: #222222; border: 3px solid #363636; -moz-border-radius-topleft: 2px; -moz-border-radius-topright: 2px; -moz-border-radius-bottomleft: 2px; -moz-border-radius-bottomright: 2px; -moz-border-top-colors: #252525 #4a4a4a #363636; -moz-border-bottom-colors: #252525 #4a4a4a #363636; -moz-border-left-colors: #252525 #4a4a4a #363636; -moz-border-right-colors: #252525 #4a4a4a #363636; cursor: default; overflow: visible; }

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...