Home › Forums › CSS › centering a floated item › Re: centering a floated item
May 9, 2008 at 11:18 am
#47393
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%*/
}
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