View Full Version : min-width and margin problem

04-26-2006, 01:28 PM

I have 2 problems, and would be really gratefull for any kind of help.

The page is in Hebrew, so I think you just won't be able to read it , but that's not that much of a problem.

As you'll see, the dotted box (in CSS: 'contenta') on the right side of the blue box is stuck to it. I tried using 'margin-right', but it doesn't affect it. The only way it will "listen" to the 'margin-right' is when I use a 'float:right' in the CSS, but then it just goes out of the blue box and doesn't look good.

My second problem is, if you resize the window so it will be smaller than the width of the tabs, the bottom part will continue shrinking, while the tabs on the top stay where they are. This looks really bad. I tried using a CSS method of 'minwidth' for the bottom part,


but that's when I started having the problem that I described yesterday, about the fact that my text paragraphs ('p') and other things like input boxes always moved off the page if I would resize the window (though if I would refresh the page they would be ok).

So in short, my 2 problems are:

1) I'd like to put a margin between the white dotted box and the right side.

2) I'd like to somehow set a minimum width for the bottom part of the main box, so that it won't get thinner than the tabs above (which i succeeded but had another problem as i described).

Here's the URL:

Many thanks!

04-26-2006, 04:57 PM
Have you tried setting the padding for the right side of the container instead?

04-26-2006, 05:23 PM
Thanks, I added the padding to the container and it's ok.. how stuipd of me.

How about the min-width, any help there?

04-26-2006, 09:49 PM
Well, Internet Explorer doesn't support min-width; it uses width as the min-width instead. I believe you can get around this by sticking a fixed-width cleared div of the width of your tabs (minus padding) at the bottom of the main div. Just set the height to 0 so it doesn't show.

04-26-2006, 11:27 PM
That really helped.

Thanks a lot!