Jump to content
  • 0

как растянуть DIV на всю ширину родительского элемента?


Likan
 Share

Question

по сути страница не сложная, проблема же вот в чем: контентная часть состоит из 2-х колонок в левой много наполнения, а правая несет оформительский характер но в ней почти ничего нет и она по высоте зависит от количества наполнения, как не пытался заставить правую растянутся на всю высоту контентной части, ничего не выходит, кучу форумов облазил, ничего путнего не нашл, подскажите плиз в чем ошибка

<div class="main-container clearfix">
<div class="head">
<div class="left">
<div class="logo" style="z-index:250"><a href="#"><img src="siteimg/logo.png"></a></div>
</div>
<div class="right"></div>
</div>

<div class="cont">
<div class="left" style="z-index:50">
<div class="ta">
<table border="0" cellpadding="0" cellspacing="0" width="100%" >
<tr height="24px">
<td colspan="3">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr height="20px">
<td width="70px"></td>
<td style="background-image:url(siteimg/podi.gif); background-repeat:no-repeat">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="padding-top:5px; padding-left:17px"><a href="#"><img src="siteimg/onas.jpg" /></a></td>
<td style="padding-top:5px;padding-left:28px"><a href="#"><img src="siteimg/cp.jpg" /></a></td>
<td style="padding-top:5px;padding-left:20px"><a href="#"><img src="siteimg/kont.jpg" /></a></td>
</tr>
</table>
</td>
<td width="40px"></td>
</tr>
<tr height="4px" style="background-color:#887973">
<td colspan="3" style="background-color:#887973"></td>

</tr>
</table>
</td>
</tr>
<tr>
<td class="tl" width="6px"></td>
<td class="text" style="background-color:#FFFFFF"> <h1 style="padding-top:35px">Заголовок</h1><br>
текст...... </td>
<td class="tr" width="6px"></td>
</tr>
<tr height="8px">
<td valign="top" align="right" width="6px"><img src="siteimg/nlugol.png"></td>
<td class="tn"></td>
<td valign="top" align="left" width="6px"><img src="siteimg/npugol.png"></td>
</tr>
</table>
</div>
<div class="dirka"><img src="siteimg/dirka.jpg"></div>
<div class="kop" style="z-index:150">как же без копирайта? ну так вот я копирайт</div>
</div>
<div class="right" style="z-index:1">
<div class="menu">
<table class="tt" border="0" cellpadding="0" cellspacing="0">
<tr height="35px">
<td colspan="2" style="font-size:18px">Меню</td>
</tr>
<tr height="30px">
<td valign="top" style="padding-top:2px" align="left" width="8px"><img src="siteimg/kub.gif"></td>
<td valign="top" style="padding-left:6px"><a href="#"><b>qw</b> <br> qw</a></td>
</tr>
<tr height="30px">
<td valign="top" style="padding-top:5px" align="left"><img src="siteimg/kub.gif"></td>
<td style="padding-left:6px"><a href="#"><b>qw</b> <br> qwЕ</a></td>
</tr>
<tr height="30px">
<td valign="top" style="padding-top:5px" align="left"><img src="siteimg/kub.gif"></td>
<td style="padding-left:6px"><a href="#"><b>qw</b> <br> qw</a></td>
</tr>
<tr height="30px">
<td valign="top" style="padding-top:5px" align="left"><img src="siteimg/kub.gif"></td>
<td style="padding-left:6px"><a href="#"><b>qw</b> <br> qw</a></td>
</tr>
<tr height="30px">
<td valign="top" style="padding-top:5px" align="left"><img src="siteimg/kub.gif"></td>
<td style="padding-left:6px"><a href="#"><b>qw</b> <br> qw</a></td>
</tr>
</table>
</div>



</div>
</div>
<div class="podv">
<div class="left">
</div>
<div class="right"></div>
</div>
</div>

body {margin: 0px; padding: 0px; background-color:#dbc87c;}
img { border: none; }
.main-container { width: 100%; margin: 0px auto; min-width:1000px}
clearfix:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
.clearfix { display: inline-block; }
html[xmlns] .clearfix { display: block; }
* html .clearfix { height: 1%; }




.head {position:relative; height:158px;width:100%}
.head .left {position:relative; height:158px; width:80%; background-image:url(../../siteimg/stan.jpg); background-repeat:no-repeat; background-position:left; float:left}
.head .left .logo {position:relative; height:133px; width:242px; top:63px; left:30px}
.head .right {position:relative; height:158px; width:20%; background-image:url(../../siteimg/tochki.gif); background-repeat:repeat-y; background-position:left; float:left}
.cont {position:relative; height:100%;width:100%; }
.cont .left {position:relative; height:100%; width:80%; float:left;}
.cont .left .ta {position:relative; height:100%; width:93%; left:200px;}
.cont .left .ta a {text-decoration:underline; color:#c47c0a;line-height:18px}
.cont .left .ta h1 {font-family:Arial, Helvetica, sans-serif;color:#685611; font-size:18px;line-height:18px}
.cont .left .dirka{position:relative; width:192px; height:10px; top:-285px; left:0px}
.cont .left .kop {position:relative; font-family:Arial, Helvetica, sans-serif; font-size:11px; color:#000000; float:right; width:240px; height:20px;left:0px}
.cont .right {position:relative; width:20%;height:100%; background-image:url(../../siteimg/tochki.gif); background-repeat:repeat-y; background-position:left; float:left; min-height:100%; }
.cont .right .menu {position:relative; width:109px; height:177px;top:30px;left:-390%; vertical-align:}
.cont .right .menu a {text-decoration:none; color:#000000}
.tr { background-image:url(../../siteimg/pravkraybel.png);background-repeat:repeat-y}
.tl {background-image:url(../../siteimg/levkraybel.png); background-repeat:repeat-y}
.tn {background-image:url(../../siteimg/np.png); background-repeat:repeat-x; background-position:top}
.tpu {background-image:url(../../siteimg/npugol.png); background-repeat:no-repeat}
.tlu {background-image:url(../../siteimg/nlugol.png); background-repeat:no-repeat}
.podv {position:relative; clear:both; width:100%; height:50px; background-color:#dbc87c;}
.podv .left {position:relative; height:50px; width:80%; float:left}
.podv .right {position:relative; height:50px; width:20%; background-image:url(../../siteimg/tochki.gif); background-repeat:repeat-y; background-position:left; float:left}
.text {font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:18px;padding-left:30px;padding-right:40px;padding-bottom:40px}

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