Jump to content
  • 0

Выпадающее меню.


NeuroFighter
 Share

Question

Всем добрый день. Прошу помочь. У меня проблема с вёрсткой выпадающего меню.

Код HTML:

<div class="theadmenu">

<ul id="thmenu" class="reset">

<li>

<a href="/" title="Главная"><strong>Главная</strong></a>

</li>

<li>

<a href="/info.html" title="О сайте"><strong>О сайте</strong></a> </li>

<li>

<a href="/abuse.html" title="Связь"><strong>Связь</strong></a>

</li>

<li>

<a href="/#"><strong>Важно</strong></a>

<ul>

<li><a href="#">Помощь</a></li>

<li><a href="#">Помощь</a></li>

<li><a href="#">Помощь</a></li>

<li><a href="#">Помощь</a></li>

</ul>

</li>

<li>

<a href="/#"><strong>Сайт</strong></a>

</li>

<li>

<a href="/#"><strong>Сайт</strong></a>

</li>

<li>

<a href="/#"><strong>Сайт</strong></a>

</li>

</ul>

<div class="rightrss">

<div><a href="/rss.xml">Подписаться RSS</a></div>

</div>

<div class="clear"></div>

</div>

Код CSS:

.theadmenu {

float: left;

background: url("../img/topmenu.png") no-repeat;

height: 45px;

width: 100%;

}

.theadmenu ul#thmenu {

float: left;

margin-left: 16px;

background: url("../img/thmenu.png") no-repeat 0 -90px;

height: 45px;

padding-left: 2px;

position:relative;

}

.theadmenu ul#thmenu li {

float: left;

height: 45px;

position:relative;

display:block;

}

.theadmenu ul#thmenu li a, .theadmenu ul#thmenu li a strong {

display:block;

float: left;

height: 45px;

line-height: 45px;

cursor: pointer;

text-decoration:none;

}

.theadmenu ul#thmenu li a {

color: #fff;

}

.theadmenu ul#thmenu li a strong {

padding: 0 14px 0 14px;

background: url("../img/thmenu.png") no-repeat 100% -45px;

}

.theadmenu ul#thmenu li a:hover {

color: #ffb20c;

background: #2B2B2B url("../img/thmenu.png") no-repeat 100% 0;

}

.theadmenu ul#thmenu li a:hover strong {

background: url("../img/thmenu.png") no-repeat 100% -135px;

}

/*my*/

.theadmenu ul#thmenu ul {

list-style:none;

position:absolute;

left:-9999px;

-webkit-transition:0.25s linear opacity;

}

.theadmenu ul#thmenu ul li {

float:none;

}

.theadmenu ul#thmenu ul a {

white-space:nowrap;

display:block;

}

.theadmenu ul#thmenu li:hover ul {

left:0;

}

.theadmenu ul#thmenu li:hover ul li a:hover {

background:#333;

text-decoration:underline;

}

.rightrss {

height: 45px;

}

#cu3er-container {

margin-top:10px;

margin-left:275px;

}

.rightrss div {

padding-right: 12px;

overflow: hidden;

}

.rightrss div a {

float: right;

margin-top: 13px;

color: #fff;

text-decoration: none !important;

font-size: 11px;

background: url("../img/rss.png") no-repeat 100% 0;

padding-right: 23px;

height: 21px;

line-height: 20px;

}

.rightrss div a:hover {

opacity: 0.8;

filter: alpha(opacity=80);

}

В итоге меню при выпадании своим первым пунктом налазиет на основное меню.

1526814.png

Edited by NeuroFighter
Link to comment
Share on other sites

1 answer 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.

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

  • Обсуждения

    • Актуальные контакты: 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