Hi,
I've been having a problem with CSS that's driving me crazy. I'm basically trying to set the minimum width of a div to 750px and the width to 100%, so that viewed at a resolution under 800x600, the view will still hold shape and viewed above 800x600, the view will center (I'm using text-align: center to center the div once it's 100% wide).
Makes sense? Here's the code:
CSS:
HTML:
The trouble is, when using Visual Studio 2005, the "min-width" bit in the CSS shows a red underline saying "'min-width' is not a known CSS property name"... The weird thing is, I tried it anyway and it works great in IE7, but doesn't work in Firefox... (it's usually the other way round eh?). I'm almost 100% sure that min-width IS a valid CSS property name, so can someone please show me what I'm doing wrong?
Thank you in advance,
Oli
PS if I use inline style:
there's no error in Visual Studio, but I still get the same results.
I've been having a problem with CSS that's driving me crazy. I'm basically trying to set the minimum width of a div to 750px and the width to 100%, so that viewed at a resolution under 800x600, the view will still hold shape and viewed above 800x600, the view will center (I'm using text-align: center to center the div once it's 100% wide).
Makes sense? Here's the code:
CSS:
Code:
.centerDiv
{
text-align:center;
min-width:750px;
width:100%;
}
Code:
<html>
...
<div class="centerDiv">Some text</div>
...
</html>
Thank you in advance,
Oli
PS if I use inline style:
Code:
<div style="min-width:750px;">Some Text</div>
Comment