Jump to content
  • 0

Проблема при увеличении формата страницы


Sedli
 Share

Question

Добрый день!

Помогите, пожалуйста, решить одну проблему - при увеличении формата страницы через Ctrl+scroll блоки начинают наезжать друг на друга, а горизонтальная полоса прокрутки появляется только на 170%. Как можно их зафиксировать?

Сам код:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Слои по горизонтали</title>
<style type="text/css">
.body {
text-align: center;
margin: 0;
background-image: url(grad.png);
background-repeat: repeat-x;
background-color: rgb(200,200,200);
font-size: 12pt;
font-family: Arial, sans-serif;
}
A {
color: #3366CC;
}
A:visited {
color: #330033;
}
A:active {
color: #333333;
text-decoration: none;
}
A:hover {
color: #CC0033;
}
.logo {
width: 15%;
height: 90px;
float: left;
margin-bottom: 20px;
}
.logo P {
margin-left: 20px;
}
.menu {
float: left;
height: 90px;
text-align: center;
width: 60%;
}
ul {
list-style: none;
}
li {
float: left;
padding: 10px;
background: #FFFFFF;
font-size: 105%;
}
.phone {
float: right;
width: 25%;
height: 90px;
font-size: 200%;
text-align: left;
font-family: Times New Roman, serif;
}
.phone P {
padding-right: 15px;
color: #FF3300;
}
.clear {
clear: left;
}
.x2content {
width: 48%;
float: left;
text-align: left;
padding-left: 2%;
padding-top: 2%;
}
.zagolovok {
font-family: Times New Roman, serif;
font-size: 180%;
}
.zagolovok A {
color: black;
}
.zagolovok A:hover {
text-decoration: none;
}
.image {
float: left;
margin-right: 50px;
}
.characterization {
font-size: 75%;
color: #333333;
}
.price {
color: white;
font-size: 160%;
font-weight: 600;
}
.i2content {
width: 50%;
float: left;
text-align: left;
padding-top: 2%;
}
.content {
width: 68%;
float: left;
text-align: left;
font-size: 100%;
font-family: Times New Roman, serif;
}
.content P, H3 {
padding-left: 30px;
padding-right: 80px;
}
.news {
width: 26%;
float: right;
border-left: 2px dotted;
padding-left: 2%;
padding-right: 2%;
text-align: left;
}
.newscont {
font-size: 75%;
color: #333333;
}
.newsdate {
font-size: 60%;
color: #333333;
}
.newszag {
font-weight: bold;
font-size: 75%;
}
</style>
</head>
<body class="body">
<div class="logo">
<p><img src="" alt=""></p>
</div>
<div class="menu">
<ul>
<li><a href="#">О компании</a></li>
<li><a href="#">Модели и цены</a></li>
<li><a href="#">Аксессуары</a></li>
<li><a href="#">Сервисный центр</a></li>
<li><a href="#">Новости</a></li>
<li><a href="#">Прокат</a></li>
<li><a href="#">Проведение промо-акций</a></li>
<li><a href="#">Контакты</a></li>
</ul>
</div>
<div class="phone">
<p>(495) 333-55-66</p>
</div>
<div class="clear"></div>
<div class="x2content">
<p><span class="zagolovok"><a href="#">Текст</a></span></p>
<div class="image"><a href="#"><img src="" alt="2"></a></div>
<div class="characterization">
<table cellspacing="0" cellpadding="3">
<tr><td colspan="2" align="center" bgcolor="#0099CC"><spanclass="price">цена</span></td></tr>
<tr><td></td><td></td></tr>
<tr><td>Максимальная скорость..............</td><td></td></tr>
<tr><td>Дальность пробега........................</td><td></td></tr>
<tr><td>Вес устройства................................</td><td></td></tr>
<tr><td>Аккумуляторы..................................</td><td></td></tr>
<tr><td>Дорожный просвет........................</td><td></td></tr>
<tr><td height="40px"><a href="#">Подробнее</a></td><td></td></tr>
</table>
</div>
</div>
<div class="i2content">
<p><span class="zagolovok"><a href="#">Текст</a></span></p>
<div class="image"><a href="#"><img src="#" alt="1"></a></div>
<div class="characterization">
<table cellspacing="0" cellpadding="3">
<tr><td colspan="2" align="center" bgcolor="#0099CC"><span class="price">цена</span></td></tr>
<tr><td></td><td></td></tr>
<tr><td>Максимальная скорость..............</td><td></td></tr>
<tr><td>Дальность пробега........................</td><td></td></tr>
<tr><td>Вес устройства................................</td><td></td></tr>
<tr><td>Аккумуляторы..................................</td><td></td></tr>
<tr><td>Дорожный просвет........................</td><td></td></tr>
<tr><td height="40px"><a href="#">Подробнее</a></td><td></td></tr>
</table>
</div>
</div>
<div class="clear"></div>
<div class="content">
<h3>Пример заголовка</h3>
<p>Пример текста</p>
</div>
<div class="news">
<p><span class="zagolovok"><a href="#">Новости</a></span></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td valign="top" rowspan="3" width="110px"><a href="#"><img src="#" alt="news1"></a></td>
<td><span class="newszag">Заголовок</span></td></tr>
<tr><td><span class="newsdate">Дата</span></td></tr>
<tr><td span class="newscont"><a href="#">Новость</a></td></tr>
</table>
<p></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td valign="top" rowspan="3" width="110px"><a href="#"><img src="#" alt="news2"></a></td>
<td><span class="newszag">Заголовок</span></td></tr>
<tr><td><span class="newsdate">Дата</span></td></tr>
<tr><td span class="newscont"><a href="#">Новость</a></td></tr>
</table>
<p></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td valign="top" rowspan="3" width="110px"><a href="#"><img src="#" alt="news3"></a></td>
<td><span class="newszag">Заголовок</span></td></tr>
<tr><td><span class="newsdate">Дата</span></td></tr>
<tr><td span class="newscont"><a href="#">Новость</a></td></tr>
</table>
</div>
<div class="clear"></div>
</body>
</html>

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