Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Styling My Search Form:
Old 12-18-2009, 05:46 AM Styling My Search Form:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 961
Name: Darren
Location: England
Trades: 0
Hey, I'm trying to update a search box on a site but getting stuck somewhere along the line!

If I make the search box in plain Html and CSS is looks great, but I need to include some of the old search box function and I think thats causing the problem.

I can make the "new" form without any problems, but I cant seem to include my "Old" forms functions (as in the distance radius)

Hope all this makes sense as it doesn't to me!



The code for the search form is:

Code:
 <div id="postcodeSearch">
     <div class="fg-buttonset fg-buttonset-single">
     <form method="post" action="./search.php">
     <span>Enter your postcode here</span>
     <input type="text" name="zip" id="zip" title="(e.g. AA10 9ZZ)" onBlur="this.value=this.value.toUpperCase()" value="<?PHP if(isset($_POST['zip'])) echo $_POST['zip']; ?>"/> 
     <span>and find restaurants</span>
     <br/>
     <button type="button" class="fg-button ui-state-default ui-priority-primary ui-corner-left" value="5">within 5 miles</button>
  	 <button type="button" class="fg-button ui-state-default ui-priority-primary" value="10">within 10 miles</button>
	 <button type="button" class="fg-button ui-state-default ui-priority-primary" value="20">within 20 miles</button>
	 <button type="button" class="fg-button ui-state-default ui-priority-primary ui-corner-right" value="50">within 50 miles</button>
     <button type="submit" name="submit" class="fg-button ui-state-default ui-corner-left ui-corner-right">Search</button>
	 <input type="hidden" name="radius" id="radius" style="display:none" value="<?PHP if(isset($_POST['radius'])) echo $_POST['radius']; else echo '5'; ?>">
	</select>
	   </form>
    </div> 
</div>
Now I want to change the form to look like this example:

HTML:
Code:
<div id="searchwrapper"><form action="">
<input type="text" class="searchbox" name="s" value="" />
<input type="image" src="THE_BLANK_SUBMIT_BUTTON_IMAGE" class="searchbox_submit" value="" />
</form>
</div>
CSS:
Code:
#searchwrapper {
width:310px; /*follow your image's size*/
height:40px;/*follow your image's size*/
background-image:url(THE_SEARCH_BOX_IMAGE);
background-repeat:no-repeat; /*important*/
padding:0px;
margin:0px;
position:relative; /*important*/
}
 
#searchwrapper form { display:inline ; }
 
.searchbox {
border:0px; /*important*/
background-color:transparent; /*important*/
position:absolute; /*important*/
top:4px;
left:9px;
width:256px;
height:28px;
}
 
.searchbox_submit {
border:0px; /*important*/
background-color:transparent; /*important*/
position:absolute; /*important*/
top:4px;
left:265px;
width:32px;
height:28px;
}
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-18-2009, 10:10 AM Re: Styling My Search Form:
TripleMoons's Avatar
Webmaster Talker

Posts: 619
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
A link to the site would be helpful.

In your new code, I'm not sure what you're trying to do with this:

Code:
<input type="image" src="THE_BLANK_SUBMIT_BUTTON_IMAGE" class="searchbox_submit" value="" />
When I use an image for the submit button it all goes into the CSS. In this example my XHTML for the submission button looks like this:

Code:
<input type="submit" value="Send" class="submit" />
And my CSS looks like this:

Code:
.submit {
    width: 186px;
    height: 75px;
    background: url(images/sendemail.jpg);
    text-indent: -5000px;
    border: none;
    margin-left: 120px;
}
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Old 12-18-2009, 10:41 AM Re: Styling My Search Form:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 961
Name: Darren
Location: England
Trades: 0
Thats the place holder for the submit button as in this example http://zenverse.net/create-a-fancy-s...box-using-css/
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Styling My Search Form:
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.47369 seconds with 12 queries