Обучающий отзывчивый дизайн, а также основа Zurb.
http://jsfiddle.net/CA669/1312/
2 внутренних divs, зеленый и красный, не реагируют. Текущий дизайн просто показывает, как они должны быть, на большом экране. Что нужно сделать, чтобы сделать это отзывчивым. Кроме того, я не уверен, что лучший способ показать красный div на меньших экранах.
HTML:
<div>
<div class="row fullWidth">
<div class="twelve columns banner">
<div class="logo">
Median Solutions</div>
<div class="settings">
Hello Admin |
<a>Change Password</a>
| <a>Logout</a>
</div>
</div>
</div>
</div>
CSS:
*
{
margin:0;
padding:0;
}
.fullWidth
{
width:100%;
margin-left: auto;
margin-right: auto;
max-width: initial;
}
.banner
{
background:lightgray;
height:60px;
}
.logo
{
color:White;
font-size:20px;
line-height:60px;
width:190px;
border:1px solid green;
float:left;
}
.settings
{
float:right;
line-height:60px;
color:White;
width:310px;
border:1px solid red;
}
@media all and (max-width: 510px)
{
.banner{height:auto; text-align:center;}
.settings,
.logo{float:none; display:inline-block;}
}
РЕДАКТИРОВАТЬ:
теперь выглядит с определенной шириной:
Как сказал Адриан, выпадающее меню было бы лучше, но вы также можете это сделать:
http://jsfiddle.net/CA669/1314/
@media all and (max-width: 510px) {
.banner{height:auto; text-align:center;}
.settings,
.logo{float:none; display:inline-block;}
}