home » design resources » CSS » CSS Text and Image Menu Rollover

CSS Text and Image Menu Rollover

Create an HTML menu with images and text styled with CSS:

Demo

HTML Code

<div id="menu_container">
<a href="#"><img src="images/one_s.jpg" height="86" width="108"/><span>one</span></a>
<a href="#"><img src="images/two_s.jpg" height="86" width="108" /><span>two</span></a>
<a href="#"><img src="images/three_s.jpg" height="86" width="108" /><span>three</span></a></div>

CSS Code


#menu_container{
	position:relative;
	width: 450px;
	margin:auto;
	background-color:#666666;
	height: 140px;
	padding: 10px;
}


/*  Styles for links in the #menu_container */
#menu_container a {
display: block;
color: #CCCCCC;
text-decoration:none;
float:left;
text-align:center;
margin:10px ;

}


/*  Styles for images within a link in the #container  */
#menu_container a img {
border:10px solid white; 

}

/* Styles for the span tag that holds the text */


#menu_container a  span {
display: none;
}

#menu_container a:link  span {
display: none;
}


#menu_container a:visited span {
display: none;
}


#menu_container a:hover span {
display: block;
width: 128px;
color:#000000;
background:#99CC99;  
  
}


#menu_container a:active span {
display: none;
}

Related Posts :

  • Create a simple HTML bullet list menu and style it with CSS: Demo: menu item 1 menu item 2 menu item 3 menu item 4 menu item 5 ...

  • Create a simple CSS gallery with thumbnails, large images and text. Demo IMAGE ONE:Lorem ipsum dolor sit amet, consectetur adiscing el ...

  • Create a CSS menu that indicates or highlights the current page: Demo Home About us Contact us HTML Code <ul id="secondary_m ...

  • Create a beautiful CSS Glossy menu: Demo menu item 1 menu item 2 menu item 3 menu item 4 menu item 5 HTML Code <ul id=&quo ...

This entry was posted in CSS and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>