Jump to content
  • 0

Фон с градиентом


ShootingStar
 Share

Question

Здравствуйте, верстаю 5-й урок с данного курса.

шаблон

Размер шаблона 1200px, вырезал фон для 1200px, и 1px по краям:


<header>
<div class="up">
<div class="w960">
<img src="img/logo.png" alt="" width="153" height="43" >
</div>
</div>
<div class="down">
<span class="left"></span>
<span class="right"></span>
<div class="w1200">

</div>
</div>
</header>


.w1200{
height:100%;
width:1200px;
margin: 0 auto;
}

.down{
position:relative;
}
.down .w1200{
position: relative;
z-index: 1;
height:370px;
background: url("../img/header_bg.jpg") no-repeat;
}
.down .left{
position: absolute;
left:0;
z-index:0;
width: 50%;
height: 100%;
background: url("../img/left_line.jpg") repeat-x;

}
.down .right{
position: absolute;
top:0;
right:0;
z-index:0;
width: 50%;
height: 100%;
background: url("../img/right_line.jpg") repeat-x;
}

Вот что вышло:

s_1333745387_2377171_f1e392452d.jpeg

HTML страница.

Может вместо position:absolute использовать float? Если знаете способ лучше, подскажите, пожалуйста.

Edited by ShootingStar
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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