What CSS attribute stops my site?

I look at a website on the Internet with a standard box design (the whole site is concentrated in a box and has a border on each side). When you cut it, the border becomes smaller, but the content remains the same size. This is normal.

However, on your site, as you get smaller, you just get scroll bars. The content remains intact. On my site, if you do this, things like text and links begin to scroll in several lines, and the whole site is broken. How can I save it the same way even in a small viewport?

+3
source share
3 answers

You can try the following:

#box
{
   width: 500px;
   /* overflow set to scroll will give you your scroll bars */
   overflow: scroll;
}

, , IE.

:

#container
{
/* IE will ignore min-width */
min-width: 400px;
/* IE will process the expression below to give you your minimum width, other browsers
will ignore it */
width:expression(document.body.clientWidth < 400? "400px": "auto" );
}
+3

, min-width.

0

Add the min-width and min-height attributes to your CSS content element. Like = min-width: 100px; min-height: 100px; ...

0
source

Source: https://habr.com/ru/post/1748374/


All Articles