Jump to content
  • 0

Ширина между слоями


Spartakvladimir
 Share

Question

Здравствуйте! Подскажите, пожалуйста, как мне сделать четко фиксированное расстояние, между слоями, размещенными, горизонтально, друг за другом? Потому как имеются 3 слоя, в коде которых, практически все одинаково, но все равно, при изменении размеров окна браузера между вторым и третим расстояние сохраняется, а вот первый все время под второй залезает.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Спасибо, что откликнулись. Нет, поля я не обнулял, но сделав так как вы сказали (2 варианта) проблема не решилась. Может нужны еще какие-то дополнительные данные? Код веб-страницы или полностью сss-документа?

Link to comment
Share on other sites

  • 0

ОК. Вот он:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html charset=windows-1251">
<TITLE>Название
</TITLE>
<LINK rel="Stylesheet" type="text/css" href="style.css">
<link rel="shortcut icon" href="avatar/avatar-1214.jpg">
</HEAD>
<BODY>
<div id="navback"></div>
<div id="navbar">
<p>Панель навигации</p>


<ul>
<li class="mrgn15px"><a href="#">Главная</a></li>
<li>Общение</li>
<li><ul>
<li><a href="#">Чат</a></li>
<li><a href="#">Форум</a></li>
</ul>
</li>
<li>Полезности</li>
<li>
<ul>
<li><a href="#">Ссылки</a></li>
<li><a href="#">Программы</a></li>
<li><a href="#">Опросы</a></li>
<li><a href="#">Библиотека</a></li>
</ul>
</li>
<li>Развлечения</li>
<li>
<ul>
<li><a href="#">Flash-игры</a></li>
<li><a href="#">Приколы</a></li>
<li><a href="#">Галерея</a></li>
<li><a href="#">Игры</a></li>
</ul>
</li>
</ul>
</div>
<DIV id="news">
<p>Новостной контент</p>
Всякий текст и т.д.
</DIV>
<DIV id="polz">
<p>Панель пользователя</p>


<DIV id="registr">
<FORM action="#">Логин:
<BR>
<INPUT type="text" name="login" maxlength="25">
<BR> Пароль
<BR>
<INPUT type="password" name="passwrd" maxlength="30">
<INPUT type="button" value="Войти">
<div style="text-align: left; font-size: 10px;">
<a href="#">Вы еще не зарегистрировались?
</a href>
</div>
</FORM>
</DIV>
</DIV>
</BODY>
</HTML>

А вот полностью существующая на данный момент таблица стилей:

/* CSS Document */
* {
margin: 0;
padding: 0;
}
body {
background-color: rgb(214,214,214);
font-family: Colibri,Helvetica,Verdana,sans-serif;
font-size: 16px;
color: black
}
#navbar, #news, #polz {
top: 20px
}
#navbar {
position: absolute;
width: 15%;
left: 20px
}
#navbar ul {
list-style: none;
margin: 0;
padding: 0
}
#navbar ul ul {
margin-left: 15px
}
#navbar li a:link, #navbar li a:visited {
text-decoration: none;
display: block;
border-left: 15px solid rgb(117,117,117);
padding: 5px 5px 5px 0,5em;
background-color: rgb(63,63,63);
color: rgb(0,255,153);
}
#navbar li a:hover {
background-color: rgb(171,171,171)
}
#navbar li {
border-bottom: 2px solid transparent
}
#navback {
background-image: url('bb1.gif');
position: absolute;
left: 20px;
}
.ink { text-align: left;
letter-spacing: 0,5em;
font-weight: 500
}
.topic {
margin-left: 30px
}
#news {
width: 60%;
text-indent: 25px;
position: absolute;
left: 21%;
font-size: 14px;
height: 100%;
text-align: justify
}
#polz {
position: absolute;
width: 15%;
height: 100%;
left: 85%
}
a:link,a:visited,a:active {
color: rgb(51,102,255)
}
p {
font-size: 16px;
text-align: center
}
.mrgn15px {
margin-left: 15px
}

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