.clear { clear: both; } #mainContainer { width: 1000px;/*** 760 ***/ margin: 0 auto; /*** Centers the design ***/ min-height: 100%; background: #ffffff url(/examples/three-column-100-bg.gif) repeat-y; /*** This is our faux columns ***/ text-align: left; /*** Because we centered the text in body we have to move the text back to left aligning ***/ } * html #mainContainer { height: 100%; /*** IE doesn't support min-height, but instead it handles height as min-height so we need to hack the height ***/ } /************************** HEADER **************************/ #header { background: #000099; padding: 10px; background-image:url(img/galaxy.jpg); height:300px; }
#menu { background: #111111; padding: 3px; height: 20px; text-align:center; margin: 0; } #menu a { color:#CCC; text-decoration:none; } #menu a:hover { color: #EDF; text-decoration: underline; } /************************** CONTENT AND COLUMNS **************************/ .outer { padding-left: 165px; } * html .outer { padding-right: 120px; /* Normally this shouldn't be in this hack, it should be in .outer, but because of IE7 I had to */ } .inner { width: 850px; /*** 595 This width is for non-IE browsers. Mozilla makes this necessary. Be sure to check your layout in different browsers if you changes this value. Especially IE7 seems to create a horisontal scroll if this value is set too large ***/ padding-bottom: 30px; } * html .inner { width: 100%; } /*** div.inner is wider than its container, div.outer, and so overlaps to the right, pushing div.right into the proper position. IE expands div.outer instead, requiring a Tan hack to avoid blowing the layout apart. IE gets the original 100% width as in the Livingstone layout. ***/ .float-wrap { float: left; width: 770px; margin-left: -165px; /*** -165 Same length as .outer padding-left but with negative value ***/ } * html .float-wrap { /*** No need for hacking IE on this layout ***/ } #content { float: right; width: 500px; background: #fff; } * html #content { position: relative; /*** IE needs this ***/ } .contentWrap{ padding: 5px; } .contentWrap ol, .contentWrap ul { margin: 3px 0 5px 35px; } .contentWrap li { padding-bottom: 2px; } /************************** LEFT COLUMN **************************/ /*** div.left is in div.float-wrap, and when div.float-wrap is neg margined to the left, div.left is carried over into the proper position. ***/ #left { float: left; width: 200px;/*** 165***/ padding: 5px; } * html #left { position: relative; /*** IE needs this ***/ } #left ul { list-style: none; padding-bottom: 4px; } #left li { padding-bottom: 2px; } /************************* RIGHT COLUMN **************************/ #right { float: right; width: 200px; padding: 5px; } * html #right { position: relative; /*** IE needs this ***/ margin-right: -120px; /*** IE gets this margin. ***/ } #right ul { list-style: none; padding-bottom: 4px; } #right li { padding-bottom: 2px; } /************************** FOOTER **************************/ #footer { width: 1000px;/*** 760 ***/ height: 30px; /*** The drawback with this solution is that the height of the footer can't be flexible. If you add so much content to the footer that it extends 30px, you will get a vertical scrollbar and the content will overflow the footer if you don't set overflow to hidden ***/ margin: 0 auto; margin-top: -30px; /*** By using a negative margin-top we now moves the footer up the same amount as the footer height to avoid vertical scrolling. Remember, if you use borders and padding on your footer you will have to calculate this in your negative margin-top value also. ***/ text-align: center; background-color: yellow; }
</style> <!-- DO NOT copy - this is analytics codes for Savio.no! --> <!-- END - DO NOT copy - this is analytics codes for Savio.no! --> </head> <body> <div id="mainContainer">
<div class="outer"> <div class="inner"> <div class="float-wrap"> <div id="content"> <div class="contentWrap"> <h2>text text text text text text text text text text text text text text text text text text text text text text text text gfgfg</h2> <h1>fffgdfgfdgd</h1>
<div class="news-zag">новостч:</div> <div class="note">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.</div>
</div> </div> <!-- end centered div --> <div id="left"> <h3>Second in source</h3> <ul>
<li><a href="#">Left menu 1</a></li> <li><a href="#">Left menu 2</a></li> <li><a href="#">Left menu 3</a></li> </ul> <p>wwwww</p>
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.
Здравствуйте, подскажите какой тег использовать для увеличения значения, пример на картинке.
Вроде, про такой тег я слышала. Если есть тег прогресс бар, значит и такое должно быть.
Question
Осенний Дождь
нашел я всё-таки макет подходящий, он почти идеален
единственная проблема, никак не могу подогнать точные размеры, блоки периодически уплывают...
хотел чтобы центр немного пошире стал, т.к. отступы слева и справа большие получаются...
уже несколько часов firebug туда сюда пробую тестирую, только нормально получается, как в ие 6 всё уезжает блинн
.outer {padding-left: 165px;
.inner {width: 850px;
.float-wrap { width: 770px;
подскажите пожалуйста, как точные размеры подобрать? пробовал суммарно складывать просчитывать, но все равно не так как нужно выходит..
#content {width: 500px;
Link to comment
Share on other sites
27 answers 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.