Jump to content
  • 0

Совмещение центрирования и фиксации.


wyvannm
 Share

Question

Начал изучать "html5, css3 и web 2.0" по Дронову. Пишет сухо, догонял, пока писал про html, в CSS вообще опа полная началась. Почитал уроки, посмотрел примеры, но не нашел ответы на интересующие вопросы. Читал примеры, листал форум, похожее есть, но не про нашу честь, как говориться. К делу:

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

Психанул, все удалил, начал заново, но и тут засада, все начинает ездить при масштабировании:

CSS:


#header{
background-image: url(images/header.png);
background-repeat:no-repeat;
width:642px;
height:109px;
margin: 0 auto;
position: relative;
z-index: 2;
}
#main{
background-image: url(images/main.jpg);
background-repeat: no-repeat;
width:986px;
height:669px;
margin: 0 auto;
margin-top: -50px;
position: relative;
z-index: 1;
}

HTML:


<html>

<head>

<title>Индекс.</title>
<link rel="stylesheet" type="text/css" href="style.css">

</head>

<body>
<div id="header"></div>
<div id="main">
<div id="menu1"></div>
<div id="menu2"></div>
<div id="menu3"></div>
<div id="menu4"></div>
</div>
<div id="content"></div>
<div id="footer"></div>
</div>
</body>

</html>

uF5srZiU.jpg

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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