Jump to content
  • 0

Помогите с css


viso
 Share

Question

для меню нужно сделать стиль активной ссылки - вот что прописал но не работает, при наведении срабатывает и потом возвращается в исходный стиль.. вот код, заранее спасибо огромное. это wordpress уже всяко делал

КОД

часть header

———--

<div id="hmenu"> <!-- Horizontal navigation menu -->

<ul>

<li><a class="v" href="<?php echo get_settings('home'); ?>"><?php _e('Home', 'f2') ?></a></li>

<?php wp_list_pages('title_li=&depth=2&sort_column=menu_order&exclude='.f2_option('hmenu_exclude')) ?>

<li class="hmenu_rss"><a href="<?php bloginfo('rss2_url'); ?>"><?php _e('Feed', 'f2') ?></a></li>

</ul>

</div>

———--

часть CSS

———--

#hmenu {

float:left;

width:auto;

border:0;

padding:0;

position:relative;

bottom:80px;

left:200px;

height:0;

margin-bottom:-23px;

}

#hmenu ul {

width:auto;

float:right;

list-style:none;

padding:0;

margin:0;

}

#hmenu ul li {

display:inline;

float:left;

width:auto;

padding:0;

margin:0;

}

#hmenu ul li a {

display:block;

/*background:#27567a;*/

color:#000;

padding:4px 20px;

margin:0 1px;

text-decoration:none;

text-transform:uppercase;

font-weight:bold;

font-size:1.1em;

border-radius:6px; -webkit-border-radius:6px; -moz-border-radius:5px; -khtml-border-radius:10px;

}

#hmenu ul li a:hover {

background-color: #ff0000;

color:#ffffff;

border-radius:6px; -webkit-border-radius:6px; -moz-border-radius:5px; -khtml-border-radius:10px;

}

#hmenu ul li a:active {

background-color: #ff0000;

color:#ffffff;

border-radius:6px; -webkit-border-radius:6px; -moz-border-radius:5px; -khtml-border-radius:10px;

}

#hmenu ul li ul {

padding:0.5px 0 0 0;

position:absolute;

display:block;

visibility:hidden;

z-index:599;

}

#hmenu ul ul li {

display:block;

float:none;

width:auto;

}

#hmenu ul li.hmenu_rss a {

background:#27567a url('images/feed.png') no-repeat 95% 50%;

padding:4px 30px 4px 20px;

}

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

css тут не поможет wp должен на активной странице приписывать к активной ссылке класс, который соответствует активной странице

да как так, с чегобы это?

ну даже если и может и так - я так уже делал - непомогло..

и это не страница к томуже а шапка а она не страница.. :), чтото мне кажется в самой теме немогу допетрить.. спасибо что ответили но безрезультатно

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