|
|
|
|
|
для: Worldmen
(18.05.2007 в 13:52)
| | У Вас получается, что при абсолютном позиционировании вы не "отталкиваетесь" от какого-то конкретного блока, а позиционирование у вас идет относительно окна броузера, вам нужно дописать стили для <td> - контейнера, в котором расположены ваши <div> position: relative;
<td colspan="11" valign="top" bgcolor="#CCCCCC" style="position: relative;">
<div align="center">Наши работы. </div>
<div class="colordiv" id="p1"> </div>
<div class="colordiv" id="p2"> </div>
<div class="colordiv" id="p3"> </div>
</td>
| и тогда у вас будет происходить абсолютное позиционирование именно относительно этой ячейки. Ну еще надо будет изменить top и left координаты у <div>-ов.
P.S. А чтобы еще и в FF и в Opera отображалось нормально, для них надо отдельные стили записать для <td> style="position: absolute; top: auto; left: auto;"
Вообще проще было бы сделать через float: left; Дивы. | |
|
|
|
|
|
|
|
для: ilyaILF
(18.05.2007 в 13:14)
| | Вот код страницы:
<html>
<head>
<title>Заголовок</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<link href="style.css" rel="stylesheet" type="text/css">
<link href="port.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff" topmargin="0" >
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="spacer.gif" width="88" height="1" border="0"></td>
<td><img src="spacer.gif" width="83" height="1" border="0"></td>
<td><img src="spacer.gif" width="88" height="1" border="0"></td>
<td><img src="spacer.gif" width="9" height="1" border="0"></td>
<td><img src="spacer.gif" width="88" height="1" border="0"></td>
<td><img src="spacer.gif" width="8" height="1" border="0"></td>
<td><img src="spacer.gif" width="88" height="1" border="0"></td>
<td><img src="spacer.gif" width="8" height="1" border="0"></td>
<td><img src="spacer.gif" width="88" height="1" border="0"></td>
<td><img src="spacer.gif" width="6" height="1" border="0"></td>
<td><img src="spacer.gif" width="88" height="1" border="0"></td>
<td><img src="spacer.gif" width="84" height="1" border="0"></td>
<td><img src="spacer.gif" width="74" height="1" border="0"></td>
<td><img src="spacer.gif" width="1" height="1" border="0"></td>
</tr>
<tr>
<td colspan="13"><img name="template2_r1_c1" src="imgstr/template2_r1_c1.jpg" width="800" height="137" border="0"></td>
<td><img src="spacer.gif" width="1" height="137" border="0"></td>
</tr>
<tr>
<td rowspan="2" colspan="2"><img name="template2_r2_c1" src="imgstr/template2_r2_c1.jpg" width="171" height="73" border="0"></td>
<td background="imgstr/template2_r2_c3.jpg" id="menu"> <a id="menu" href="index.php">Главная</a></td>
<td rowspan="2"><img name="template2_r2_c4" src="imgstr/template2_r2_c4.jpg" width="9" height="73" border="0"></td>
<td background="imgstr/img1.jpg"> </td>
<td rowspan="2"><img name="template2_r2_c6" src="imgstr/template2_r2_c6.jpg" width="8" height="73" border="0"></td>
<td background="imgstr/template2_r2_c3.jpg" id="menu"> <a href="portfol.php">Портфолио </a> </td>
<td rowspan="2"><img name="template2_r2_c8" src="imgstr/template2_r2_c8.jpg" width="8" height="73" border="0"></td>
<td background="imgstr/img1.jpg" id="menu"> </td>
<td rowspan="2"><img name="template2_r2_c10" src="imgstr/template2_r2_c10.jpg" width="6" height="73" border="0"></td>
<td background="imgstr/template2_r2_c3.jpg" id="menu"> <a href="message.php">Связь </a></td>
<td rowspan="2" colspan="2"><img name="template2_r2_c12" src="imgstr/template2_r2_c12.jpg" width="158" height="73" border="0"></td>
<td><img src="spacer.gif" width="1" height="30" border="0"></td>
</tr>
<tr>
<td><img name="template2_r3_c3" src="imgstr/template2_r3_c3.jpg" width="88" height="43" border="0"></td>
<td><img name="template2_r3_c5" src="imgstr/template2_r3_c5.jpg" width="88" height="43" border="0"></td>
<td><img name="template2_r3_c7" src="imgstr/template2_r3_c7.jpg" width="88" height="43" border="0"></td>
<td><img name="template2_r3_c9" src="imgstr/template2_r3_c9.jpg" width="88" height="43" border="0"></td>
<td><img name="template2_r3_c11" src="imgstr/template2_r3_c11.jpg" width="88" height="43" border="0"></td>
<td><img src="spacer.gif" width="1" height="43" border="0"></td>
</tr>
<tr>
<td rowspan="2"><img name="template2_r4_c1" src="imgstr/template2_r4_c1.jpg" width="88" height="356" border="0"></td>
<td colspan="11" valign="top" bgcolor="#CCCCCC">
<div align="center">Наши работы. </div>
<div class="colordiv" id="p1"> </div>
<div class="colordiv" id="p2"> </div>
<div class="colordiv" id="p3"> </div>
</td>
<td rowspan="2"><img name="template2_r4_c13" src="imgstr/template2_r4_c13.jpg" width="74" height="356" border="0"></td>
<td><img src="spacer.gif" width="1" height="274" border="0"></td>
</tr>
<tr>
<td colspan="11"><img name="template2_r5_c2" src="imgstr/template2_r5_c2.jpg" width="638" height="82" border="0"></td>
<td><img src="spacer.gif" width="1" height="82" border="0"></td>
</tr>
<tr>
<td colspan="13" align="center"><font face="verdana" size="2" color="#000000"> </font></td>
</tr>
</table>
</body>
</html>
|
файл port.css:
#p1{
top:250px;
left:210px;
height:100px;
width:100px;
position:absolute;
font-weight:normal;
}
#p2{
top:250px;
left:320px;
height:100px;
width:100px;
position:absolute;
font-weight:normal;
}
#p3{
top:250px;
left:430px;
height:100px;
width:100px;
position:absolute;
font-weight:normal;
}
|
| |
|
|
|
|
|
|
|
для: Worldmen
(18.05.2007 в 13:10)
| | Надо посмотреть код, так очень трудно что-либо предполагать. | |
|
|
|
|
|
|
| Использую тег div и стили, в которых указываю относительное расположение.
При просмотре в браузере при разрешении 1024х768 - новмально, а при 1280х1024 - смещяеться и выводиться не на том месте на котором нужно.
Как иссправить. | |
|
|
|
|