Jump to content

Первая законченная верстка.


Red Planet
 Share

Recommended Posts

  • Replies 79
  • Created
  • Last Reply

Top Posters In This Topic

В Internet Explorer 6 наблюдается проблема.

После добавления белой панели логотип стал сползать вниз.

31340m.gif

HTML.

<!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" lang="ru" xml:lang="ru">
<head>
<title>Bluish</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="my-style.css" rel="stylesheet" type="text/css" media="all" />

<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix.js" mce_src="pngfix.js"></script>
<link href="my-style-ie.css" rel="stylesheet" type="text/css" />
<![endif]-->

</head>
<body>

<div id="wrapper">

<ul class="menu">
<li><a href="#" class="home"></a></li>
<li><a href="#" class="about"></a></li>
<li><a href="#" class="what"></a></li>
<li><a href="#" class="support"></a></li>
<li><a href="#" class="privecy"></a></li>
<li><a href="#" class="blog"></a></li>
<li><a href="#" class="contact"></a></li>
</ul>

<div class="top-white-bar">
A Totaly Different Age With <span class="red">100%</span> Safety For Future
</div>

<a href="#" title="Bluish"><img src="images/logo.png" alt="Bluish - varius ullamcorper" /></a>

<div id="left-sdbr">
</div> <!--left-sdbr -->

<div id="right-sdbr">
</div> <!--right-sdbr -->

<div id="content">
<img src="images/pictures.png" alt="Gallery" />
</div> <!--content -->

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

</body>
</html>

CSS.

body {
background: url('images/bg-gradient.png') repeat-x #075d79;
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
color: #b3d8e4;
}


* {
margin: 0;
padding: 0;
}


ul {
list-style: none;
}


img {
border: none;
}


#wrapper {
width: 942px;
margin: 30px auto 0;
}


ul.menu, div.top-white-bar {
float: right;
}


ul.menu li {
float: left;
}


ul.menu li a {
display: block;
height: 37px;
background-position: left top;
}


ul.menu li a:hover {
background-position: left 37px;
}


a.home {
background: url('images/menu/home.png');
width: 83px;
}


a.about {
background: url('images/menu/about.png');
width: 90px;
}


a.what {
background: url('images/menu/what.png');
width: 161px;
}


a.support {
background: url('images/menu/support.png');
width: 85px;
}



a.privecy {
background: url('images/menu/privecy.png');
width: 119px;
}


a.blog {
background: url('images/menu/blog.png');
width: 65px;
}


a.contact {
background: url('images/menu/contact.png');
width: 92px;
}


div.top-white-bar {
background: url('images/white-bar.png');
width: 675px;
height: 23px;
padding: 7px 0 0 20px;
margin-top: 5px;
font-weight: bold;
color: #2b2b2b;
}


div.top-white-bar span.red {
color: #bf0505;
}


#left-sdbr {
float: left;
width: 150px;
}


#right-sdbr {
float: right;
width: 150px;
}


#content {
margin: 0 150px 0;
}

Link to comment
Share on other sites

psywalker, спасибо, проблема решена.

Но появился более общий вопрос. В коде указано и для строки меню и для белой области float: right. На макете они оба прижаты к правой стороне. Но! Ведь если указано float: right для двоих, подряд идущих, то они должны располагаться в линию, а не друг за другом. Не располагаются они в линию только лишь потому, что блок wrapper имеет фиксированную ширину.

Не является ли безграмотным решение поставить float: right для двоих, подряд идущих?

Link to comment
Share on other sites

Еще вопрос.

Верстаю блок с контентом, правую и левую колонку. Логотип и верхние панели (меню и белая) различаются по высоте. При установке отступа margin-top для контента и боковых колонок каждый браузер по своему решает: один от логотипа все отступы считает, так как логотип ниже белой панели заканчивается, другой считает левой колонке от логотипа, правой - от белой панели, а нужно, чтобы для всех от одного считало. Сделал пустой блок (называется for-margin), чтобы все ровно было. Правильно так делать?

Смотреть верстку

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


  • Обсуждения

    • Актуальные контакты: Telegram: @Nikker_web E-Mail:   tarasevich.email@gmail.com Портфолио https://www.behance.net/d4d4186e Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ    
    • Актуальные контакты: Telegram: @Nikker_web E-Mail:   tarasevich.email@gmail.com   Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ   Портфолио https://www.behance.net/d4d4186e
    • Доброго всем времени суток. Прошу помощи. Научите принципу изменения футера. Движок Xenforo. Версия 2.2.10. Стиль дефолтный. Что именно нужно в итоге на фото примере. Мой шаблон app.footer less имеет следующее значение.  .p-footer { .xf-publicFooter(); a { .xf-publicFooterLink(); } } .p-footer-inner { .m-pageWidth(); .m-pageInset(); padding-top: @xf-paddingMedium; padding-bottom: @xf-paddingLarge; } .p-footer-row { .m-clearFix(); margin-bottom: -@xf-paddingLarge; } .p-footer-row-main { float: left; margin-bottom: @xf-paddingLarge; } .p-footer-row-opposite { float: right; margin-bottom: @xf-paddingLarge; } .p-footer-linkList { .m-listPlain(); .m-clearFix(); > li { float: left; margin-right: .5em; &:last-child { margin-right: 0; } a { padding: 2px 4px; border-radius: @xf-borderRadiusSmall; &:hover { text-decoration: none; background-color: fade(@xf-publicFooterLink--color, 10%); } } } } .p-footer-rssLink { > span { position: relative; top: -1px; display: inline-block; width: 1.44em; height: 1.44em; line-height: 1.44em; text-align: center; font-size: .8em; background-color: #4682B4; border-radius: 2px; } .fa-rss { color: white; } } .p-footer-copyright { margin-top: @xf-elementSpacer; text-align: center; font-size: @xf-fontSizeSmallest; } .p-footer-debug { margin-top: @xf-paddingLarge; text-align: right; font-size: @xf-fontSizeSmallest; .pairs > dt { color: inherit; } } @media (max-width: @xf-responsiveMedium) { .p-footer-row-main, .p-footer-row-opposite { float: none; } .p-footer-copyright { text-align: left; padding: 0 4px; // aligns with other links } }  
    • Нужны сайты с примерами верстки, типа https://css-tricks.com/. Типовые приемы и нестандартные на все случаи жизни. Накидайте ссылок.
×
×
  • 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