Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS centering a floated item Re: centering a floated item

#47393
Nodster
Member

Ok then,

As i understand it, you are creating this 3 column display.
the left and right column are fixed and the maincontent div is variable.

If that is correct then why not simply use the max / min-width selectors in the maincontent div.

eg

Code:
div #maincontent {
min-width:10%;
max-width:80% /*assuming left column is 20%*/
}

This should also work if you want to set the widths to either em, px etc.

see here for further explanation: http://reference.sitepoint.com/css/max-width