HTML CSS rollover effect

Asked

Viewed 338 times

0

I am trying to do a rollover effect on CSS someone could tell me if it is possible with HTML and CSS in the way that the codes ? the effect would just be to add a black border around each menu item . Thank you for your attention !!!

inserir a descrição da imagem aqui

@charset "utf-8";
/* CSS Document */


#topo {
	background:url(../imagens/topo.png);	
	position:inherit;
	width:1024px;
	height:190px;
	border-bottom:none;
	margin:auto;

}

#logo {
	float:left;
	background:url(../imagens/logoc.png);
	position:relative;
	top:50px;
	left:230px;
	width:541px;
	height:133px;
}
	
#fundoinicial {
	background-image:url(../imagens/fundoof.png);
	width:1024px;
	height:1080px;
	margin:auto;
	
}

#menufundo {
	background:url(../imagens/menu.png);
	position:relative;
	width:1024px;
	height:30px;
	margin:auto;
}


#ul li a{
	font-family:Arial, Helvetica, sans-serif;
	display: inline;
	font-size:20px;
	line-height:0px;
	padding:10px;
    margin:5px 0 0 52px;
	color:#FFF;
	text-decoration:none;
	float:left;
	
	
	
}
<!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>Alfatec</title>

<link href="css/reset.css" rel="stylesheet" type="text/css" />
<link href="css/estilo.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
	background-image: url(../PLANILHAS%20CAIO/projeto/imagens/fundo.jpg);
}
{
	
</style>
</head>


<body>

<div id="logo">
					</div>			<!--div final do logo-->
<div id="topo"></div>			<!--div final topo-->  
			
			 
        <div id="menufundo">
		
		
		<nav id="ul">
       		<ul>            
        		<li><a href="#">Página Inicial   </a></li> 
        		<li><a href="#">Quem Somos</a></li>
        		<li><a href="#">Áreas de Cobertura</a></li>
        		<li><a href="#">Serviços</a></li>
        		<li><a href="#">Fale Conosco</a></li>
    		</ul>
       </nav>
	                   
</div>                
			<div id ="fundoinicial"></div>	


	
                    
                    
          
                  	
                        
              			
                   
                        
</body>
</html>

2 answers

0

I think Voce wants a hover effect, right? If so, try

#menu ul li:hover{
   border: 1px solid black;
}
  • Yes , Thank you very much , only this happening a problem the edge turns black only that creates a box around the text I wanted this effect only happen in the text , would have as ?

  • I got it, I used #ul li a:Hover { color:#000; }

0


Your code appears broken here, but I imagine you’re wondering how to make effects of Hover.

It’s simple, just change your CSS based on the selector :hover. In your case I imagine you must want something like this:

#ul li a {
    /* seu código aqui */
    border: 1px solid black; /* Exemplo */
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.