Hi all,
I have a 3 boxes within a container. One is floated left, one right, and one I want to center but it would be preferable to allow it to have a min-width somehow (for varying user text sizes).
Thanks!
Hi all,
I have a 3 boxes within a container. One is floated left, one right, and one I want to center but it would be preferable to allow it to have a min-width somehow (for varying user text sizes).
Thanks!
dont know if this will help but i know in CSS there is a min-width:
This should work on all elements except table elements i believe. And also note this will not work in IE 5.5 or 6 and only works partially in Safari 1.2Code:div { /* this way */ min-width: 50px; /* or this */ min-width: 35%; /* or this */ min-width: inherit; }
Hope this helps!
>_>
I'm trying to center an element with min-width.
ok well i dont know if this is what you mean but i would do something like that by doing this:
Code:<html> <head> <title>3 column Divs</title> <style type="text/css"> #left, #center, #right { display: block; width: 25%; height: 100%; border: 1px solid black; } #left { position: absolute; left: 0px; top: 0px; } #center { position: absolute; left: 25%; top: 0px; width: 50%; } #right { position: absolute; right: 0px; top: 0px; } </style> </head> <body> <div id="left"> Left content! </div> <div id="center"> Center content! </div> <div id="right"> Right content! </div> </body> </html> it makes it so there is a left column, center column, and right column...and of course the column sizes and position can be changed in the CSS
Bookmarks