Is there an alternative to min-width in CSS for HTML

liunx

Guest
Hi all<br />
<br />
I am after a property for a <td> tag to allow me to insert a picture and centre it on screen, but i need to have the table set at a width of 100% but without the cuting off the right hand side of the image when the window is resized or on a smaller monitor. <br />
<br />
To do this requires me to have a minimum width for each picture.<br />
<br />
Is there anyone who knows of a property? <br />
<br />
Thanks smercer<!--content-->No, just set a width to the table cell. Tables, unlike divs, are made to stretch, so having min width and letting it resize is basically going to act exactly the same as just setting the width of the cell. You are thinking more of a maximum width for the picture maybe? max-width is not going to do a thing to table stretching I think, I have never tried it, but tables are just made to stretch for their content. <!-- w --><a class="postlink" href="http://www.bluerobot.com">www.bluerobot.com</a><!-- w --> has two good centering examples, I like the auto width margins one myself, the first 1, it does not depend on the width of the element like the negative margins example does.<!--content-->I agree with Peo. Your description sounds like you want an image/table that resizes, based on the screen resolution or browser window size. There's no way to keep from cutting off the right side of an image if the user resizes his window. Somebody help me with this, but isn't there a javascript method to open the new window to a particular size & declare something like 'resize=no'?<!--content-->Why not just have a div on the page, put the image in the div, and put text-align: center on the div. You may need margin:auto on the image for moz.<!--content-->you can resize the image to fit resolutions if you just do a % width. Or do auto width and set the margins, that could possibly work.<!--content-->Hi all <br />
<br />
Why not just have a div on the page, put the image in the div, and put text-align: center on the div. You may need margin:auto on the image for moz. <br />
<br />
Would div work with multiple columns? I have mainly 2 columns, sometimes 3. but on the left hand column is a picture that makes the page look 3d and have it set as a background picture for the <td> in css, which is why I do not want to abandon the table format.<br />
<br />
Have a look at the screen dump that I attached to get an idea of the layout of my page<br />
<br />
Thanks to all for helping<br />
smercer<!--content-->If anyone wants to view the site I am designing, please send me a personal message and I will email it to you in a zip file (1.3Mb in size). I have tried using inline styles for CSS but i must have something wrong.<!--content-->Hi all<br />
<br />
I have finally worked out how to get the images to show when I have the <td> set at 100% but not to get cut off when the window is resized. For all the people who would like to know, I did some searching on the net and found:<br />
<br />
{ overflow: visible | hidden | auto }<br />
<br />
I used [visible] and now it works perfectly.<br />
<br />
Thanks to all who have helped me, you have all been a great help.<br />
<br />
smercer<!--content-->
 
Back
Top