Jump to content

Archived

This topic is now archived and is closed to further replies.

MarkS

why wont the image line up

Recommended Posts

[code]<?php

$html = "<form name='search' method='post' action='search.php'>";
$html .="<div style='vertical-align: middle;'>Search  \n";
$html .="<input type='hidden' name='search' value='1'>\n";
$html .="<select name='catagory'>\n";
$html .="<option value='user'>DJ Name</option>\n";
$html .="<option value='location'>Location</option>\n";
$html .="<option value='religion'>Genre</option>\n";
$html .="</select> \n";
$html .="<input type='text' name='string' size='25' border-color='blue'> \n";
$html .="<input type='image' src='http://www.cublox.com/images/go.jpg'></div></form> \n";

echo $html;

?>[/code]

Thats the code im using for the search box in the header of www.cublox.com

Why does the image not line up? Please can you tell me how to get the image to line up, and if its possible to make the input box border blue, and make the image not have a border?

Thanks in advance

my other question in another area never got answered so im hoping this one will  ;D

Share this post


Link to post
Share on other sites
Since this is either a pure html or an html/css questions, let's move it to right place because that WILL increase the chances of getting a reply.

Share this post


Link to post
Share on other sites
Guest WarpNacelle
Hi,

Move the 'vertical-align' style from your <div> to your <input> button and then set the border to zero - like so:

[code]
$html .="<div>Search  \n";

....

$html .="<input type='image' src='http://www.cublox.com/images/go.jpg' style='vertical-align: middle; border: 0'></div></form> \n";
[/code]

Also change the <input> text field to:

[code]
$html .="<input type='text' name='string' size='25' style='border: 1px solid #3333FF'> \n";

[/code]

Change the HEX color to whatever blue you want.

Later!

Share this post


Link to post
Share on other sites
[quote author=MarkS link=topic=107399.msg430928#msg430928 date=1157753141]
i doubt it
[/quote]

Looks like we both win.

Share this post


Link to post
Share on other sites
while i could kiss you, one more question  :-* haha

I want to make the text "search" font size 2 ie <font size="2"> but i know i cant do it like that

How would i go about it? :)


AndyB: that was a first time poster..you in disguise?  ;)

Share this post


Link to post
Share on other sites
Guest WarpNacelle
Hi,

The CSS for changing your font size is:

style="font-size: 12px" - for example.  You can adjust the size to suit your needs.  Add it to your <div> just before the "search" text.

[quote author=MarkS link=topic=107399.msg430943#msg430943 date=1157753941]

AndyB: that was a first time poster..you in disguise?  ;)

[/quote]

No, that was my first post.  I'd been viewing the boards in stealth mode and finally decided to become official.
You'll have to clear it with my wife before you kiss me.
:D

Later

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.