Jump to content
  • 0

Как стелать правильно?


Mr.Black
 Share

Question

8 answers to this question

Recommended Posts

  • 0

Я сделал так и не знаю правильно ли!

<ul class="headerMenu" >
<li><a href="" >Главная</a></li>
<li><a href="" >Девушки</a></li>
<li><a href="" >Стрип-клюбы</a></li>
<li><a href="" >Сауны</a></li>
<li><a href="" >Услуги</a></li>
<li><a href="" >Массажистки</a></li>
<li><a href="" >Добавить анкету</a></li>
</ul>

.headerMenu {
background: #573810;
display: table;
width: 100%;
list-style: none;
-webkit-box-shadow: #231b10 1px 2px 3px;
-moz-box-shadow: #231b10 1px 2px 3px;
box-shadow: #231b10 1px 2px 3px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
}
.headerMenu li {
display: table-cell;
font: italic 18px Georgia, sans-serif;
}
.headerMenu li:hover {
background: #b90202;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#e80505), to(#9b0000));
background: -webkit-linear-gradient(#e80505, #9b0000);
background: -moz-linear-gradient(#e80505, #9b0000);
background: -ms-linear-gradient(#e80505, #9b0000);
background: -o-linear-gradient(#e80505, #9b0000);
background: linear-gradient(#e80505, #9b0000);
}
.headerMenu li:first-child {
-webkit-border-top-left-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-moz-border-radius-topleft: 8px;
-moz-border-radius-bottomleft: 8px;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
}
.headerMenu li:last-child {
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
-moz-border-radius-topright: 8px;
-moz-border-radius-topright: 8px;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
}

.headerMenu li a {
background: url('../images/headerMenuLiBg.png') right top no-repeat;
display: block;
padding: 13px 0 15px;
text-decoration: none;
text-align: center;
color: #fff;
}

Хотелось бы еще чтобы отступы у a были всегда однаковы

Link to comment
Share on other sites

  • 0

Не то?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Документ без названия</title>
<style type="text/css">
.headerMenu {
background: #573810;
display: table;
width: 100%;
list-style: none;
-webkit-box-shadow: #231b10 1px 2px 3px;
-moz-box-shadow: #231b10 1px 2px 3px;
box-shadow: #231b10 1px 2px 3px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
border-collapse: collapse;
}
.headerMenu li {
display: table-cell;
width: 14.2%;
font: italic 18px Georgia, sans-serif;
}
.headerMenu li:hover {
background: #b90202;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#e80505), to(#9b0000));
background: -webkit-linear-gradient(#e80505, #9b0000);
background: -moz-linear-gradient(#e80505, #9b0000);
background: -ms-linear-gradient(#e80505, #9b0000);
background: -o-linear-gradient(#e80505, #9b0000);
background: linear-gradient(#e80505, #9b0000);
}
.headerMenu li:first-child {
-webkit-border-top-left-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-moz-border-radius-topleft: 8px;
-moz-border-radius-bottomleft: 8px;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
}
.headerMenu li:last-child {
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
-moz-border-radius-topright: 8px;
-moz-border-radius-topright: 8px;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
}

.headerMenu li a {
background: url('../images/headerMenuLiBg.png') right top no-repeat;
display: block;
padding: 0px 0 0px;
text-decoration: none;
text-align: center;
color: #fff;
}
</style>
</head>

<body>
<ul class="headerMenu" >
<li><a href="" >Главная</a></li>
<li><a href="" >Девушки</a></li>
<li><a href="" >Стрип-клюбы</a></li>
<li><a href="" >Сауны</a></li>
<li><a href="" >Услуги</a></li>
<li><a href="" >Массажистки</a></li>
<li><a href="" >Добавить анкету</a></li>
</ul>

Link to comment
Share on other sites

  • 0

Это же таблица как бы. Вот поэтому пункты и сужаются, если сужается меню.

Как тебе этот вариант?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Документ без названия</title>
<style type="text/css">
* { margin: 0; padding: 0;}
.headerMenu {
background: #573810;


width: 100%;
list-style: none;
-webkit-box-shadow: #231b10 1px 2px 3px;
-moz-box-shadow: #231b10 1px 2px 3px;
box-shadow: #231b10 1px 2px 3px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
border-collapse: collapse;
}
.headerMenu:after {
overflow: hidden;
content: '';
display: block;
clear: both;
height: 0;

}
.headerMenu li {
float: left;


width: 14.2%;
font: italic 18px Georgia, sans-serif;
}
.headerMenu li:hover {
background: #b90202;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#e80505), to(#9b0000));
background: -webkit-linear-gradient(#e80505, #9b0000);
background: -moz-linear-gradient(#e80505, #9b0000);
background: -ms-linear-gradient(#e80505, #9b0000);
background: -o-linear-gradient(#e80505, #9b0000);
background: linear-gradient(#e80505, #9b0000);
}
.headerMenu li:first-child {
-webkit-border-top-left-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-moz-border-radius-topleft: 8px;
-moz-border-radius-bottomleft: 8px;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
}
.headerMenu li:last-child {
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
-moz-border-radius-topright: 8px;
-moz-border-radius-topright: 8px;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
}

.headerMenu li a {
background: url('../images/headerMenuLiBg.png') right top no-repeat;
display: block;
padding: 0px 0 0px;
text-decoration: none;
text-align: center;
height:60px;

color: #fff;
}
</style>
</head>

<body>
<ul class="headerMenu" >
<li><a href="" >Главная</a></li>
<li><a href="" >Девушки</a></li>
<li><a href="" >Стрип-клюбы</a></li>
<li><a href="" >Сауны</a></li>
<li><a href="" >Услуги</a></li>
<li><a href="" >Массажистки</a></li>
<li><a href="" >Добавить анкету</a></li>
</ul>

Link to comment
Share on other sites

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