Mr.Black Posted October 13, 2011 Report Share Posted October 13, 2011 (edited) Всем доброго времени суток. Меня интересует вопрос. Как бы вы сделали вот такое http://imageshack.us/photo/my-images/843/41779380.png/P.s ошибся в титле темы ) Edited October 13, 2011 by Mr.Black Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted October 13, 2011 Report Share Posted October 13, 2011 А что именно смущает? Quote Link to comment Share on other sites More sharing options...
0 Mr.Black Posted October 13, 2011 Author Report Share Posted October 13, 2011 Я сделал так и не знаю правильно ли!<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 были всегда однаковы Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted October 13, 2011 Report Share Posted October 13, 2011 display: table; - Значит уже растягивается, как таблица. Дели 100% на 7, и проставляй эту ширину пунктам. Quote Link to comment Share on other sites More sharing options...
0 Mr.Black Posted October 13, 2011 Author Report Share Posted October 13, 2011 http://imageshack.us/photo/my-images/823/21282033.png/ - меня интересует как сделать так, что у всех рахстояние у блока было одинаковое Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted October 13, 2011 Report Share Posted October 13, 2011 Не то?<!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> Quote Link to comment Share on other sites More sharing options...
0 Mr.Black Posted October 13, 2011 Author Report Share Posted October 13, 2011 совсем не то (http://imageshack.us/photo/my-images/13/21615386.png/ Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted October 13, 2011 Report Share Posted October 13, 2011 Это же таблица как бы. Вот поэтому пункты и сужаются, если сужается меню.Как тебе этот вариант?<!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> Quote Link to comment Share on other sites More sharing options...
0 Mr.Black Posted October 13, 2011 Author Report Share Posted October 13, 2011 Тоже не то...Думаю тему можно считать закрытой, так как тут нужно писать груду кода. Работает ,ну так что еще нужно)http://imageshack.us/photo/my-images/710/70489025.png/ Quote Link to comment Share on other sites More sharing options...
Question
Mr.Black
Всем доброго времени суток. Меня интересует вопрос. Как бы вы сделали вот такое http://imageshack.us/photo/my-images/843/41779380.png/
P.s ошибся в титле темы )
Edited by Mr.BlackLink to comment
Share on other sites
8 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.