Jump to content
  • 0

Помогите настроить положение текста в таблице


skoch244
 Share

Question

Помогите настроить положение текста в таблице, я уже часа 3 сижу ничего по толку сделать не могу, помогите!!!

В таблице есть картинка которая всплывает при наведении, как видите она находится в таблице, из-за картинки текст смещается чуть-чуть вверх, а мне надо чётко по середине, как по вертикале так и по горизонтале. Помогите пожалуйста)))


<html>
<head>
<style type="text/css">
A.S1 {
display: block;
width: 200px;
height: 30px;
}
A.S1:hover {
background: url(1.gif); (Ссылка на всплывающую картинку)
}
</style>
</head>
<body>
<table border="0" cellspacing="0">
<tr>
<td width="200" height="30" align="center"><a href="#" class="S1">menu</a></td>
</tr>
<tr>
<td width="200" height="30" align="center"><a href="#" class="S1">menu</a></td>
</tr>
<tr>
<td width="200" height="30" align="center"><a href="#" class="S1">menu</a></td>
</tr>
<table>
</body>
</html>

516495m.png

Edited by skoch244
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

первый вариант:

попробуй или у background: url(1.gif) подобрать значение атрибута top (в пикселях)

второй вариант:

попробуй к самой ссылке (<a>) добавить стиль line-height и тоже подобрать нужное значение.

если я не так понял и насоветовал зря, то пеняй на себя

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