Jump to content
  • 0

Непонятная ширина body


s.schurov
 Share

Question

Всем привет!

не понимаю баг это или что. В общем ситуация такая.

html:

<body>

<header id="header" class="cf"></header>

<section id="content" class="cf"></section>

</body>

css:

#header {

width: 1026px;

margin: 0 auto;

padding: 0 127px;

background: #d85055 top center;

}

#content {

width: 994px;

margin: 0 auto;

padding: 0 143px;

}

У меня фиксированная ширина в 1280px. В расширении хрома ставлю размер окна 1280px, появляется скролл.

ширина хедера и контента 1280px как и нужно. а вот у боди 1253px и появляется скролл. что делать не могу понять. помогает только overflow: hidden. но это не есть хорошо.

Спасибо..

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

могу предположить, что у вас появляется горизонтальный скролл, в следстви того, что у вас видимо есть вертикальный, а он как-раз около 20px и отбирает от body, а еще могут быть margin

Edited by Switch74
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy