Jump to content
  • 0

Не понимаю...


epog333
 Share

Question

У меня проблема, не могу прижать боковые колонки к верху.

b222fdb588e488699396e35caeaa3d28.PNG

Вот код:

<style>
.left_container {border: 1px solid gray; width: 200px; height:100px; background-color: #fefefe; border-spacing: 0px;}

.left_title {background-image: url('http://img-life.ru/upload_image/cc8e25dab286958a2cc47ccfe98a06a8.png'); height:30px; font-family: Verdana; font-size: 12px; border-bottom: 1px solid gray; padding-left: 5px; color: white; font-weight: bold;}

.left_message {vertical-align: top; padding: 5px; font-family: Verdana; font-size: 12px;}

.center_container {border: 1px solid gray; width: 800px; height:100px; background-color: #fefefe; border-spacing: 0px;}

.center_title {background-image: url('http://img-life.ru/upload_image/cc8e25dab286958a2cc47ccfe98a06a8.png'); height:30px; font-family: Verdana; font-size: 12px; border-bottom: 1px solid gray; padding-left: 5px; color: white; font-weight: bold;}

.center_message {vertical-align: top; padding: 5px; font-family: Verdana; font-size: 12px;}

.verh_menu {background-image: url('http://img-life.ru/upload_image/cc8e25dab286958a2cc47ccfe98a06a8.png'); height:30px; font-family: Verdana; font-size: 12px; border: 1px solid gray; color: white; width: 1204px; text-align:center;}

a:link {font-size:12px; text-decoration: none; color: white;}

a:visited {font-size:12px; text-decoration: none; color: white;}

a:hover {font-size:12px; text-decoration: none; color: white; text-shadow: #00a2ff 1px 1px 1px;}

reklama {font-size:12px; text-decoration: none; color: #f4ffaa;}

reklama:hover {font-size:12px; text-decoration: none; color: #f4ffaa; text-shadow: #00a2ff 1px 1px 1px;}

</style>
<body>
<div align="center" >
<!--Меню-->
<table>
<tr>
<td class="verh_menu">

<a href="/" >Главная</a> | <a href="/" >Форум</a> | <a href="/"><reklama>Рекламная ссылка</reklama></a>

</td>
</tr>
</table>
<!--/Меню-->
<table >
<tr>
<td>
<!-- Левый -->
<table class="left_container" >
<tr>
<td class="left_title">Кнопки</td>
</tr>
<tr>
<td class="left_message"><div align="center"><img src="http://counter.yadro.ru/hit?t13.15;r;s1680*1050*24;uhttp%3A//megasoft.3dn.ru/;0.7987173930534416" /> <img src="http://artvit.ru/cypr?domain=megasoft.3dn.ru" /></div></td>
</tr>
</table>
<!-- /Левый -->

<!-- Центер -->
</td>
<td>
<!-- Реклама -->
<table class="center_container" >
<tr>
<td class="center_title" >Рекламный блок</td>
</tr>
<tr>
<td class="center_message" >Реклама</td>
</tr>
</table>
<!-- /Реклама -->
<table class="center_container">
<tr>
<td class="center_title">Пробная запись</td>
</tr>
<tr>
<td class="center_message">Текст материала</td>
</tr>
</table>


</td>
<td>
<!-- /Центер -->
<!-- Правый -->
<table class="left_container">
<tr>
<td class="left_title">Кнопки</td>
</tr>
<tr>
<td class="left_message"><div align="center"><img src="http://counter.yadro.ru/hit?t13.15;r;s1680*1050*24;uhttp%3A//megasoft.3dn.ru/;0.7987173930534416" /> <img src="http://artvit.ru/cypr?domain=megasoft.3dn.ru" /></div></td>
</tr>
</table>
<!-- /Правый -->

</td>
</tr>
</table>

</div>

Пробывал в CSS вставлять "vertical-align:top;", в параметры таблица "valign="top"" но нечего не получается :blush:

Помогите пожалуйста

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
Похоже вы не тем ячейкам задаете выравнивание.

А где задавать?

Я прописываю.

TD {vertical-align: top;}

Раньше в DreamWeaver всё решалось одной кнопкой, а теперь юзаю PHPDesigner

Link to comment
Share on other sites

  • 0

В том то и дело, что вам надо не ко всем ячейкам это применять, а только к определенным. Но эти ячейки у вас никак не обозначены классами. Так что вначале надо ввести какой-нибудь класс, к примеру topcell, в стилях указать

.topcell { vertical-align: top; }

и добавить class="topcell" к тем ячейкам, которые должны выравниваться по верхнему краю.

Link to comment
Share on other sites

  • 0
В том то и дело, что вам надо не ко всем ячейкам это применять, а только к определенным. Но эти ячейки у вас никак не обозначены классами. Так что вначале надо ввести какой-нибудь класс, к примеру topcell, в стилях указать

.topcell { vertical-align: top; }

и добавить class="topcell" к тем ячейкам, которые должны выравниваться по верхнему краю.

Спасибо большое, отличный сайт и форум! Часто пользуюсь справочниками с вашего сайта, спасибо что вы есть :). Я просто не правильно расставил комментарии в html и запутался с таблицами, дивами ещё не очень хорошо верстаю... :blush:

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