Jump to content

How to change shape of text field


lucy

Recommended Posts

I want to create a search bar, which is rectangular with right angled edges, but i can only get one with rounded(ish) corners. See images below:

 

I want the search bar to look like this:

captureynv.jpg

 

but i can only get it to look like this:

capture1dck.jpg

 

Can anyone give me a solution or point me in the right direction please.

 

Thanks,

Lucy

Link to comment
https://forums.phpfreaks.com/topic/171309-how-to-change-shape-of-text-field/
Share on other sites

Put an id to the search field, such below...

 

<input type='text' id='search' name='search' />
<input type='submit' value='search' name='search' />

Change the 'name=' to the names you already have.

 

Then apply some CSS to the input, put this in the header...

 

<style type='text/css' ref='stylesheet'>
#search
{
     padding-5px; /* adjust to make it fit with the image */
     margin-right: -5px;
}
</style>

You can put the CSS in with your file, if you have it already.

 

Hope that helped.

Yes that has made the image stick by the search box, but it has not made the search box with sharp 90 degree corners as in the image, it has kept the box with rounded corners.

 

How can i make the corners sharp?

 

Thanks :)

Just add this to the CSS of the '#search'...

border: 0px;

 

Hope this helps.

Archived

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

×
×
  • Create New...

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.