Is there a way to pre-allocate the space needed for a border for a:hover so the text doesn't move when the cursor is over it? My next question requires the page listed below. The darker gray span doesn't change with the rest of the hyperlink, is there a way for the whole byperlink to change?
code below:
<html>
<style>
<!--
#contextMenu
{
width: 200px;
position: absolute;
background-color: #cfcfcf;
border: 2px outset white;
padding: 0px;
}
#vertBorder
{
width: 30px;
height: 100%;
background-color: #b1b1b1;
z-index: 1
}
span.menuPic
{
position: absolute;
z-index: 99;
left: +10px;
margin-top: 5px;
}
a
{
width: 100%;
color: black;
text-decoration: none;
z-index: 1;
}
a:hover
{
background-color: #efefef;
width: 100%;
text-decoration: none;
border: solid #000000 1px;
z-index: 1;
}
-->
</style>
<body>
<span id="contextMenu">
<a href=" <span id="vertBorder"></span>
<span class="menuPic"><img width="10" height="10" border="0"></span>
<span> One</span>
</a>
<a href=" <span id="vertBorder"></span>
<span class="menuPic"><img width="10" height="10" border="0"></span>
<span> Two</span>
</a>
<a href=" <span id="vertBorder"></span>
<span class="menuPic"><img width="10" height="10" border="0"></span>
<span> Three</span>
</a>
<a href=" <span id="vertBorder"></span>
<span class="menuPic"><img width="10" height="10" border="0"></span>
<span> Four</span>
</a>
</span>
</body>
</html>
code below:
<html>
<style>
<!--
#contextMenu
{
width: 200px;
position: absolute;
background-color: #cfcfcf;
border: 2px outset white;
padding: 0px;
}
#vertBorder
{
width: 30px;
height: 100%;
background-color: #b1b1b1;
z-index: 1
}
span.menuPic
{
position: absolute;
z-index: 99;
left: +10px;
margin-top: 5px;
}
a
{
width: 100%;
color: black;
text-decoration: none;
z-index: 1;
}
a:hover
{
background-color: #efefef;
width: 100%;
text-decoration: none;
border: solid #000000 1px;
z-index: 1;
}
-->
</style>
<body>
<span id="contextMenu">
<a href=" <span id="vertBorder"></span>
<span class="menuPic"><img width="10" height="10" border="0"></span>
<span> One</span>
</a>
<a href=" <span id="vertBorder"></span>
<span class="menuPic"><img width="10" height="10" border="0"></span>
<span> Two</span>
</a>
<a href=" <span id="vertBorder"></span>
<span class="menuPic"><img width="10" height="10" border="0"></span>
<span> Three</span>
</a>
<a href=" <span id="vertBorder"></span>
<span class="menuPic"><img width="10" height="10" border="0"></span>
<span> Four</span>
</a>
</span>
</body>
</html>