-
1 Attachment(s)
Div in a fieldset
The following HTML is a validation at the end of a form to prevent spam. It looks like the image attached.
HTML Code:
<fieldset>
<legend>Validate Your Message <span class="errors">Error message here<?php echo $visitorcodeErr ?></span></legend>
<span class="required">Required</span>
<center>
<img src="randomImage.php" alt="Captcha Image"/>
<input type="text" name="visitorcode" class="data" size="6" />
<!--Refresh Validate Code Button Facility-->
<a href><img src="refresh.jpg" onclick="history.go()" alt="Refresh Code" /></a>
</center>
</fieldset>
Seeking to activate the refresh image as a sprite using the css control below.
Code:
/*Refresh Validate Code Rollover*/
#flip {border: 0px; font-size: 0px; width: 35px; height: 35px;}
#flip a {background: url(./refresh.jpg); display: block; width: 35px;height: 35px;}
#flip a.link {background-position: 0px 0px;}
#flip a.link:hover {background-position: 0 bottom;}
The rollover works in a normal <div>. Have tried the <div> within the fieldset but positioning is then out. Is there a work around or diff approach?
-
my advice is not to use no-space breaks in order to position the items. instead, use css positioning in order to do it.
In other words, set each item an id, and position them using
Code:
position: absolute;
and then using left or right controls, margins and padding in order to achieve it. Hopefully then the frameset won't effect the box.
Tell me if you have any problems.
-
Also, get rid of the <center></center> tags. Use css to centre things.