Menu
Hi there!
Anyone know how to make a rollover buttons using external style sheet with DIV tag?
I have attached 2 buttons in a zip file for testing. I usually use Dreamweaver CS3 to do my rollover buttons but I would like to learn how create it within the external style sheet. I also usually use TABLE and TR within the HTML page but would like to replace them with DIV tag. The external style sheet will control all the rollover buttons.
Thanks in advance!!
[upl-file uuid=d72c75a2-89dd-422a-ab39-b8fa93b868a2 size=804B]buttons.zip
[CODE]#list li {
list-style: none;
margin-bottom: 2px;
}
#list a {
display: block;
width: 97px;
text-align: center;
line-height: 1.6em;
text-transform: lowercase;
text-decoration: none;
color: #FFFFFF;
font-weight: bold;
font-size: 11px;
height: 1.6em;
background-color: #666666;
}
#list a:hover {
color: #000000;
}[/CODE]
[CODE]#list {
font-size: 12px;
color: #000000;
width: [COLOR="Red"]250px[/COLOR];
float: left;
padding: [COLOR="Red"]0px[/COLOR];
}
#list li {
list-style: none;
margin-bottom: 2px;
}
#list a {
display: block;
width: [COLOR="Red"]250px[/COLOR];
text-decoration: none;
color: [COLOR="Red"]#A13713[/COLOR];
height: [COLOR="Red"]25px[/COLOR];
[COLOR="Red"]background-position: left top;
font-size: 1px;[/COLOR]
}
#list a:hover {
background-position: left bottom;
}
#list #nav-contact a {
background-image: url(images/Button_Contact.gif);
}[/CODE]
[CODE]
<div id="list">
<ul>
<li><a href="contact.html"><span>Contact Us</span></a></li>
</ul>
</div>
[/CODE]
[CODE] <div id="list">
<ul>
<li id="nav-home"><a href="index.html">Home</a></li>
<li id="nav-design"><a href="design.html">Site Design</a></li>
<li id="nav-host"><a href="hosting.html">Hosting</a></li>
<li id="nav-port"><a href="portfolio.html">Portfolio</a></li>
[COLOR="Blue"]<li id="nav-contact"><a href="contact.html">Contact</a></li>[/COLOR]
</ul>
</div>[/CODE]
[CODE]
<div id="list">
<ul>
<li id="nav-home"><a href="index.html">Home</a><li id="nav-design"><a href="design.html">Site Design</a><li id="nav-host"><a href="hosting.html">Hosting</a><li id="nav-port"><a href="portfolio.html">Portfolio</a><li id="nav-contact"><a href="contact.html">Contact</a></li>
</ul>
</div>[/CODE]
[CODE] <div id="list">
<ul>
<li id="nav-home"><a href="index.html">Home</a></li>
<li id="nav-design"><a href="design.html">Site Design</a></li>
<li id="nav-host"><a href="hosting.html">Hosting</a></li>
<li id="nav-port"><a href="portfolio.html">Portfolio</a></li>
<li id="nav-contact"><a href="contact.html">Contact</a></li>
</ul>
</div>[/CODE]
[CODE]#list {
font-size: 12px;
color: #000000;
padding: 0px;
[COLOR="Red"]height: 25px[/COLOR];
}
#list li {
list-style: none;
[COLOR="Red"]float: left;[/COLOR]
}
#list a {
width: [COLOR="Red"]160px[/COLOR];
text-decoration: none;
color: #A13713;
height: 25px;
background-position: left top;
font-size: 1px;
[COLOR="Red"]float: left;[/COLOR]
}
#list a:hover {
background-position: left bottom;
}
#list #nav-home a {
background-image: url(images/Button_Home.gif);
}
#list #nav-design a {
background-image: url(images/Button_Design.gif);
}
#list #nav-host a {
background-image: url(images/Button_Hosting.gif);
}
#list #nav-port a {
background-image: url(images/Button_Portfolio.gif);
}
#list #nav-contact a {
background-image: url(images/Button_Contact.gif);
}[/CODE]
[CODE]#list {
font-size: 12px;
color: #000000;
padding: 0px;
height: [COLOR="Red"]27px[/COLOR];
}
#list a {
width: [COLOR="Red"]158px[/COLOR];
text-decoration: none;
color: #A13713;
height: 25px;
background-position: left top;
font-size: 1px;
float: left;
[COLOR="Red"]border: 1px solid #CC9966;
border-right-color: #333300;
border-bottom-color: #333300;[/COLOR]
}[/CODE]
[CODE]#list a:hover {
background-position: left bottom;
[COLOR="Red"]border-color: #333300 #CC9966 #CC9966 #333300;[/COLOR]
}[/CODE]
0.1.9 — BETA 6.18