Jump to content
  • 0

Как растянуть таблицу на ширину родительского блока?


DrTiBiBo
 Share

Question

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

Имеется html:

<div id="partner_info">
<div class="title">
<a class="a_closed"><img class="arrow" src="images/arrow_closed.gif" /></a>
?????????
</div>
<table id="partner_info_table" class="close">
<tr>
<td class="pi_name bold">????????:</td>
<td class="pi_value">???????</td><%//TODO Buyer%>
<td class="pi_name bold">test23</td>
<td class="pi_value">test</td>
</tr>
</table>
</div>

К нему CSS:

#partner_info{
border:1px solid black;
border-top:none;
background-color:#DEEDFE;
padding:0 10px 5px 10px;

}
.arrow{
display:block;
width:14px;
height:12px;
float:left;
margin:8px 5px 0 0;
border:none;
}
.a_closed:hover{
cursor:pointer;
}
.a_opened:hover{
cursor:pointer;
}
#partner_info_table{
margin-top:5px;
border:none;
width:100%;
border-collapse: collapse;
position:relative;
}
#partner_info_table tbody{
width:100%;
}
#partner_info_table tr{
height:15px;
width:100%;
}
#partner_info_table td{
padding:0;
}
#partner_info_table td.pi_name{
width:10%;
min-width: 10%;
}
#partner_info_table td.pi_value{
width:40%;
}

В IE таблица отображается во всю ширину родительского #partner_info. В Firefox таблица тоже растягивается на 100%, НО tbody занимает всего лишь 50% ширины.

h_1337843465_6837551_f69b7dcfde.png

Вопрос:

Как растянуть таблицу на ширину родительского блока?

Заранее благодарен

С уважением

Доктор ТиБиБо

Edited by DrTiBiBo
Link to comment
Share on other sites

1 answer 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