Jump to content
  • 0

Не совпадают границы блоков


param
 Share

Question

Здравствуйте. Ситуация заключается в следующем есть на странице четыре центрированных блока, одинаковой ширины. Всем им заданы бордюры слева и справа, у первых трёх блоков бордюры совпадают, а нижний блок ужодит на пиксель в сторону, из-за чего возникает такой глюк? Как его можно исправить? (браузер Mozilla Firfox).

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Выяснил, что проблема в третьем блоке в котором располагается три колонки. Почему то они не становятся как надо, а сдвигаются на пару пикселей вправо. Почему то мне кажется, что проблема именно в позиционирование правой колонки...

<section id="middle">
<div id="container">
<div id="content">
content <br />
</div>
</div>

<aside id="sideRight">

</aside>

<aside id="sideLeft">

</aside>

</section>


#middle{
width:100%;
min-height:100%;
background:url(images/all.jpg) repeat-y;
border-left:1px solid #b4b0b0;
border-right:1px solid #b4b0b0;
}
#container{
width:100%;
float:left;
overflow:hidden;
margin-top:445px;
}
#content{
padding:0 270px 0 220px;
}
#sideLeft{
float:left;
width:199px;
margin-left:-100%;
position:relative;
margin-top:445px;
}
#sideRight{
float:left;
margin:0 -3px 0 -264px;
width:264px;
position:relative;
margin-top:445px;
}

Edited by param
Link to comment
Share on other sites

  • 0

Нет проблема оказалась не в правой колонки, а в блоке middle.Странное дело есть поменять его значение width со 100%, на 998px, то бордюры начинают совпадать. Почему же возникает этот глюк с двумя пикселями?

upd: Хотя оно и понятно откуда берутся эти два пикселя бордюры имеют ширину как раз 1 пикс., установка их с двух сторон, как раз и даёт 2 пикс. Но тогда не понятно, можно ли вообще реализовать такой вариант или вместо бордюров также нужна фоновая картинка?

Edited by param
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