Expand or reduce the screen size depending on the screen size

I'm pretty trash with CSS, I'm confused, not bash my head against a brick wall ...

www.SchofieldBell.com

I have a part of the page in the middle, putting everything inside #wrapper:

#wrapper
{
    BORDER-RIGHT: 0px solid; 
    BORDER-TOP: 0px solid; 
    BORDER-LEFT: 0px solid; 
    BORDER-BOTTOM: 0px solid; 

    PADDING-TOP: 0px;   
    PADDING-RIGHT: 0px; 
    PADDING-LEFT: 0px; 
    PADDING-BOTTOM: 17px; 
    MARGIN: 0px auto; 

    WIDTH: 900px;

    DISPLAY: block;

    POSITION: relative; 
    TOP: 0px; 
}

But I want the left side of the page (bit missing) to expand or decrease depending on the screen size ...

Any ideas?

+3
source share
5 answers

First of all, write the CSS code in all lowercase lines - it’s easier to read. :-)

#wrapper {
    width: 90%;
}

Will ensure that #wrapper always has a width equal to 90% of the viewport (browser viewport).

or

#wrapper {
    margin: 20px;
}

ensures that the #wrapper width is always 100% of the viewing area, minus 20 pixels on each side.

?

0
+1

...

  • , - , 5-8
  • 23% min-height.
  • 1600x1200, .
  • CSS/tables/ iFrames , .

.

0

, , : div #wrapper c. 900px . , , .

0

A List Apart, , , ( , ).

2 columns, liquid, fixed right

0
source

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


All Articles