Jump to content
  • 0

вертикальное выравнивание элементов


pattaya
 Share

Question

Опять-доброй ночи.

<div class="container2">

<div class="hr">Subsea Enclosures</div>

<div class="host">

<p style="margin:30px 0 0 15px" align="left"><span class="text_black">Subsea Enclosures</span></p>

<table>
<tr>
<td width="33%" style="vertical-align:top"><img src="../images/Subsea Enclosures/Subsea Enclosures1.gif" />Metallic Enclosures</td>
<td width="33%"><img src="../images/Subsea Enclosures/Subsea Enclosures2.gif" />Plastic Enclosures</td>
<td width="33%"><img src="../images/Subsea Enclosures/Subsea Enclosures3.gif" />Design,<br />
Engineering & <br/>
structural analysis</td>

</tr>
</table>
</div>
</div>

,

а это стили:

.host	  { text-align:center;
margin:0 30px;
font-size:18px;
vertical-align:top;

}

.container2 {
left : 0;
position : relative;
top : 0;
width : 944px;
z-index : 10;
color : #006699;
}

.hr { padding:5px 0;
position:relative;
border-bottom:4px solid #006699;
width:100%;
font-weight:bolder;
text-align:left;
color:#006699;
text-indent:30px;

}

.host { text-align:center;
margin:0 30px;
font-size:18px;
vertical-align:top;

}

подскажите пожалуйста почему содержимое таблицы не хочет выравниваться по вертикали классом .host? Или как образом убрать пробел между <p> и <table>?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

эмс. в общем вам наверно надо обнулять некоторые элементы.

пробел между абзацем и таблицей?

.host p {margin:0; padding:0;}
.host td {vertical-align:top;}
.host table {border-collapse: collapse; border-spacing: 0;}

Link to comment
Share on other sites

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