Please don't laugh when you see the code, I am not a HTML or CSS crack, and I only started to modify a small portion of the main template.
This is how the quicklink buttons were originally done:
Code
<td valign="bottom"><a href="index.php?module=pagesetter&func=pubedit&tid=8&goback=1"
onMouseOut="MM_swapImgRestore()"onMouseOver="MM_swapImage('Image12','','
<!--[$imagepath]-->/blue100_crepair.gif',1)">
<img src="<!--[$imagepath]-->/grey100_crepair.gif" alt="Campus Repair"
name="Image12" width="100" height="26" border="0"></a>...(three more buttons following)... </td>
onMouseOut="MM_swapImgRestore()"onMouseOver="MM_swapImage('Image12','','
<!--[$imagepath]-->/blue100_crepair.gif',1)">
<img src="<!--[$imagepath]-->/grey100_crepair.gif" alt="Campus Repair"
name="Image12" width="100" height="26" border="0"></a>...(three more buttons following)... </td>
I wanted to replace the javascript flyover with CSS, so I did this:
Code
<td valign="bottom"><td valing="bottom" width=100 height=26>
<div class="quick"><a href="index.php?module=pagesetter&func=pubedit&tid=8&goback=1">Support</a></div></td>...
<div class="quick"><a href="index.php?module=pagesetter&func=pubedit&tid=8&goback=1">Support</a></div></td>...
I created another cell for the first button, and inside a div. The blank button image consists of two buttons side by side (one in colour, one in grey) and will be switched through CSS:
Code
/* div for CSS flyover image swap */
.quick a {
display: block;
width: 100px;
height: 26px;
vertical-align: middle;
background: transparent url(../images/double.gif) no-repeat;
COLOR: #000000; FONT-SIZE: 14px; FONT-WEIGHT: bold; FONT-FAMILY: Verdana, Helvetica; text-align: center; vertical-align: middle; TEXT-DECORATION: none
}
.quick a:hover {
background-position: -100px 0;
COLOR: #FFFFFF; FONT-SIZE: 14px; FONT-WEIGHT: bold; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none
}
.quick a {
display: block;
width: 100px;
height: 26px;
vertical-align: middle;
background: transparent url(../images/double.gif) no-repeat;
COLOR: #000000; FONT-SIZE: 14px; FONT-WEIGHT: bold; FONT-FAMILY: Verdana, Helvetica; text-align: center; vertical-align: middle; TEXT-DECORATION: none
}
.quick a:hover {
background-position: -100px 0;
COLOR: #FFFFFF; FONT-SIZE: 14px; FONT-WEIGHT: bold; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none
}
The flyover works fine, but I can only control the button text horizontally. Whatever I try, I can not get it down into the middle or to the bottom of that button/div/td. Just look at the "Support" button here.
Is anyone out there with a suggestion what I am doing wrong or how I could fix this?
edited by: dl7und, Sep 19, 2006 - 07:06 PM
--
And out of the chaos sounded a voice and spoke: "Be happy and smile, for it could have come worse."
And I was happy and smiled - and it came worse...
