<style>
#levo {
background: url(levo.gif) no-repeat;
width:40px;
height:104px;
float:left;
margin-left:287px;
margin-top:-42px;
}
#middle {
background:url(middle.gif) repeat-x;
float:left;
height:41px;
margin-left:0px;
}
#buttons {
clear:both;
margin: 0 0 0 0 ;
}
#right {
background: url(right.gif) no-repeat;
width:40px;
height:104px;
float:left;
margin-left:0px;
margin-top:0px;
}
#levo1 {
background: url(levo.gif) no-repeat;
width:40px;
height:104px;
float:left;
margin-left:500px;
margin-top:-146px;
}
#middle1 {
background:url(middle.gif) repeat-x;
float:left;
height:41px;
margin-left:540px;
margin-top:-104px;
}
#right1 {
position:relative;
left:840px;
background: url(right.gif) no-repeat;
width:40px;
height:104px;
float:left;
margin-top:-104px;
}
</style>
</head>
<body>
<div id="cont">
<div id="buttons">
<div id="levo"></div>
<div id="middle">dasddsdddddddddd</div>
<div id="right"></div>
</div>
<div id="das">
<div id="levo1"></div>
<div id="middle1">sSa</div>
<div id="right1"></div>
</div>
</div>
Единият бутон се позиционира както трябва ,но другият нещо не мога да го оправя.Искам вторият бутон да е на 30px разстояние от другия.Позиционирах само left1 и middle1 ,но след като middle1 се разтяга не знам как да позиционирам right1.Ако му се сложи float:left отива най в ляво.
#levo {
background: url(levo.gif) no-repeat;
width:40px;
height:104px;
float:left;
margin-left:287px;
margin-top:-42px;
}
#middle {
background:url(middle.gif) repeat-x;
float:left;
height:41px;
margin-left:0px;
}
#buttons {
clear:both;
margin: 0 0 0 0 ;
}
#right {
background: url(right.gif) no-repeat;
width:40px;
height:104px;
float:left;
margin-left:0px;
margin-top:0px;
}
#levo1 {
background: url(levo.gif) no-repeat;
width:40px;
height:104px;
float:left;
margin-left:500px;
margin-top:-146px;
}
#middle1 {
background:url(middle.gif) repeat-x;
float:left;
height:41px;
margin-left:540px;
margin-top:-104px;
}
#right1 {
position:relative;
left:840px;
background: url(right.gif) no-repeat;
width:40px;
height:104px;
float:left;
margin-top:-104px;
}
</style>
</head>
<body>
<div id="cont">
<div id="buttons">
<div id="levo"></div>
<div id="middle">dasddsdddddddddd</div>
<div id="right"></div>
</div>
<div id="das">
<div id="levo1"></div>
<div id="middle1">sSa</div>
<div id="right1"></div>
</div>
</div>
Единият бутон се позиционира както трябва ,но другият нещо не мога да го оправя.Искам вторият бутон да е на 30px разстояние от другия.Позиционирах само left1 и middle1 ,но след като middle1 се разтяга не знам как да позиционирам right1.Ако му се сложи float:left отива най в ляво.