Jump to content
  • 0

onmouseover - Вопрос


alekcandr
 Share

Question

Добрый вечер, возник вопрос по поводу оформления div-блоков. Вот решил изменить навигацию,при наведении мышкой нужный блок, он выделяется цветом. Но код получился громоздкий ... Может кто подскажет как можно сделать с помощью CSS, так как я побывал но выделялась только область ссылки, а не блок целиком. За ранее благодарен.

<div class="navigation_menu" onmouseover="this.className='navigation_menu_bg'" onmouseout="this.className='navigation_menu'"><img src="../images/icon_menu/home.gif" width="10" height="10"><a href="/index.php" title="Главная страница сайта"> Главная страница</a></div>

<div class="navigation_menu" onmouseover="this.className='navigation_menu_bg'" onmouseout="this.className='navigation_menu'"><img src="../images/icon_menu/news.gif" width="10" height="10"> <a href="/news" title="Новости"> Новости</a></div>

<div class="navigation_menu" onmouseover="this.className='navigation_menu_bg'" onmouseout="this.className='navigation_menu'"><img src="../images/icon_menu/history.gif" width="10" height="10"><a href="/history.html" title="История учебного заведения"> Наша история</a></div>

  .navigation_menu  {

margin: 5px 0px 5px 0px;
padding: 3px 7px 3px 7px;
border: 1px solid #cdc9c9;
font-family:Tahoma, Arial, Helvetica, sans-serif;
font-size:12px;

}

.navigation_menu a:link {

text-decoration: none;

}

.navigation_menu_bg {

margin: 5px 0px 5px 0px;
padding: 3px 7px 3px 7px;
border: 1px solid #cdc9c9;
font-family:Tahoma, Arial, Helvetica, sans-serif;
font-size:12px;
background-color: #dcd9d9;

}

.navigation_menu_bg a:link {

text-decoration: none;

}

Link to comment
Share on other sites

3 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.

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