Jump to content
  • 0

Статический фон по углам сайта


Champ
 Share

Question

Здравствуйте!

Пробую сделать сайт со статическим фонам по его углам.

Вёрстку делаю через дивы.

Вожусь достаточно давно, перечитал кучу советов, но всё равно что-то не работает :(

Вот код:


<div align="center" style="width: 100%">
<div align="center" class="TableMainTopRight">
<div align="center" class="TableMainTopLeft">
<div align="center" class="TableMainBottomLeft">
<div align="center" class="TableMainBottomRight">
<div align="center" style="padding: 20px 0px 60px 0px">
<div style="background-color: #FEFCF7; height: 100%; width: 670px; vertical-align: top;
border: 1px solid sienna">
<div align="center" class="FrameBackGroundTop">
<div align="center" class="FrameBackGroundBottom">
<table style="width: 670px">
<tr>
<td style="vertical-align: top">
Тут какой-то полезный текст
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

Содержимое ЦСС:


body
{
margin: 0px;
padding: 0px;
height: 100%;
background-image: url(/Images/bg.jpg);
background-attachment: fixed;
overflow: hidden;
}
table
{
border-collapse: collapse;
margin: 0px;
padding: 0px;
text-align: left;
}
td
{
padding: 0px;
margin: 0px;
}
a
{
}
h1
{
color: #94282e;
}
h2
{
color: #94282e;
}
h3
{
color: #94282e;
}
img
{
border: none;
}
p
{
text-indent: 20px;
text-align: justify;
}
.TableMainTopRight
{
background-image: url(/Images/FlowerTopRight.png);
background-attachment: fixed;
background-position: top right;
background-repeat: no-repeat;
width: 100%;
height: 100%;
min-height: 100%;
position: absolute;
text-align: center;
}
.TableMainTopLeft
{
background-image: url(/Images/FlowerTopLeft.png);
background-position: top left;
background-repeat: no-repeat;
background-attachment: fixed;
width: 100%;
height: 100%;
min-height: 100%;
position: absolute;
text-align: center;
}
.TableMainBottomRight
{
background-image: url(/Images/FlowerBottomRight.png);
background-position: bottom right;
background-repeat: no-repeat;
background-attachment: fixed;
width: 100%;
height: 100%;
min-height: 100%;
position: absolute;
text-align: center;
overflow-y: scroll;
}
.TableMainBottomLeft
{
background-image: url(/Images/FlowerBottomLeft.png);
background-position: bottom left;
background-repeat: no-repeat;
background-attachment: fixed;
width: 100%;
height: 100%;
min-height: 100%;
position: absolute;
text-align: center;
}
.FrameBackGroundTop
{
background-image: url(/Images/FrameBackGroundTop.png);
background-repeat: repeat-x;
background-position: top;
}
.FrameBackGroundBottom
{
background-image: url(/Images/FrameBackGroundBottom.png);
background-repeat: repeat-x;
background-position: bottom;
}

Причём в каждом браузере отображается по своему. А в ИЕ вообще пустота.

Вот как оно выглядит:

Пример

Прошу помощи.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

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