Jump to content
  • 0

Фиксирование объектов на странице


Sergius61
 Share

Question

Здравствуйте!

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

Содержание страницы:

.....

<link rel="stylesheet" href="style.css" type="text/css" media="screen, projection" />

<!--[if lte IE 6]><link rel="stylesheet" href="style_ie.css" type="text/css" media="screen, projection" /><![endif]-->

</head>

<body>

<div id="wrapper">

<div id="header">

<div class="header">

<img src="imagesBlank/fon001_1.jpg" width="100%" height="149" border="0">

</div>

</div>

<div id="middle">

<div id="container">

<div id="content">

<strong>Content:</strong>

</div><!-- #content-->

</div><!-- #container-->

<div class="sidebar" id="sideLeft">

<img src="imagesBlank/fon001_2.jpg" width="183" height="551" border="0">

</div><!-- .sidebar#sideLeft -->

<div class="sidebar" id="sideRight">

<strong>Right Sidebar:</strong>

</div><!-- .sidebar#sideRight -->

</div><!-- #middle-->

</div><!-- #wrapper -->

<div id="footer">

<img src="imagesBlank/fon001_3.jpg" width="100%" height="40" border="0">

</div><!-- #footer -->

</body>

</html>

——————————————--

содержание файла style.css

——————————————--

* {

margin: 0;

padding: 0;

}

html {

height: 100%;

}

body {

font: 12px/18px Arial, Tahoma, Verdana, sans-serif;

height: 100%;

}

a {

color: blue;

outline: none;

text-decoration: underline;

}

a:hover {

text-decoration: none;

}

p {

margin: 0 0 18px

}

img {

border: none;

}

input {

vertical-align: middle;

}

#wrapper {

width: 100%;

min-width: 1000px;

min-height: 100%;

height: auto !important;

height: 100%;

}

/* Header (шапка)

—————————————*/

#header {

position: fixed;

top: 0;

left: 0;

width: 150%;

.header {

position: relative;

width: 150px;

margin: 0 auto;

top: 12px;

left: 323px;

border: 1px solid #0C0;

background: #EAFFEA;

}

.header p {

padding: 10px 12px 12px;

margin: 0;

text-align: center;

}

/* Middle

————————————--*/

#middle {

width: 100%;

padding: 0 0 100px;

height: 1%;

position: relative;

background: #DFEFF1;

}

#middle:after {

content: '.';

display: block;

clear: both;

visibility: hidden;

height: 0;

}

#container {

width: 100%;

float: left;

overflow: hidden;

}

#content {

padding: 0 270px 0 270px;

}

/* Sidebar Left

————————————*/

#sideLeft {

float: left;

width: 250px;

margin-left: -100%;

position: relative;

background: #FFFFFF;

}

/* Sidebar Right

———————————--*/

#sideRight {

float: left;

margin-right: -3px;

width: 250px;

margin-left: -250px;

position: relative;

background: #FFACAA;

}

/* Footer (низ)

————————————--*/

#footer {

margin: -100px auto 0;

min-width: 1000px;

height: 100px;

background: #FFFFFF;

position: relative;

}

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