Results 1 to 3 of 3

Thread: Div in a fieldset

  1. #1
    Join Date
    Aug 2011
    Location
    Rep Of Ireland
    Posts
    126
    Thanks
    24
    Thanked 3 Times in 1 Post

    Default 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"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="text" name="visitorcode" class="data" size="6" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    	            <!--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?

  2. #2
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    47
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    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.

  3. #3
    Join Date
    Apr 2012
    Location
    Chester, Cheshire
    Posts
    329
    Thanks
    7
    Thanked 35 Times in 35 Posts

    Default

    Also, get rid of the <center></center> tags. Use css to centre things.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •