Old 08-27-2005   #1 (permalink)
Registered User
 
ViciOuS's Avatar
 
Join Date: Apr 2005
Posts: 82

Using images for input fields in html.. Help!

Recently and in the past I have seen people that use images for input fields. It especially works wonders with certian unique site themes and seems quite easy but i've ran into a dead end and I need some help.

I did a test with the src attribute in the input tag. The HTML is below, but it doesn't work correctly, anyone know why?

Code:
<HTML>
..etc..etc...

<Form>
	<input type="text" src="InputBox.gif" value="Test ME">
</Form>
ViciOuS is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-28-2005   #2 (permalink)
Recursively call who?
 
GoldNetX's Avatar
 
Join Date: Nov 2003
Location: Pittsburgh, PA
Posts: 294

Send a message via AIM to GoldNetX
It is rather simple. Here is the method I use:

Code:
<div id="linkinput" style="background-image:url(images/images_09.png);">
<input type="text" style="background-color: transparent; border: solid 0px #FFF;" maxlength="100" name="site"/>
</div>
It will require a little tweaking to make sure the box is positioned right and the DIV is the correct size. But what this effectively does is it creates a div with your background image. This div then contains the form input box, but the input box is actually completely transparent, minus the text.

There may be a simpler way to do it, but this works for me.

You can see and example of it here: http://www.gusmayo.gwgaming.net/
I use it on my shoutbox inputs.
__________________

www.gusmayo.com
- Maybe a story or two -


www.jaloobie.com
... your new home ...

www.webinkproductions.com
- professional web application design -
GoldNetX is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-28-2005   #3 (permalink)
Registered User
 
ViciOuS's Avatar
 
Join Date: Apr 2005
Posts: 82

Awesome. More help then I had expected

hmm, the image just repeats itself until the end of the screen, I added in css WxH attributes in the style attribute but still does it.

Last edited by ViciOuS; 08-28-2005 at 03:26 AM..
ViciOuS is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-28-2005   #4 (permalink)
Recursively call who?
 
GoldNetX's Avatar
 
Join Date: Nov 2003
Location: Pittsburgh, PA
Posts: 294

Send a message via AIM to GoldNetX
Try adding this to the css style:

Code:
background-repeat: no-repeat;
So it would be like this:

Code:
<div id="linkinput" style="background-image:url(images/images_09.png); background-repeat: no-repeat; width:#px; height:#px">
<input type="text" style="background-color: transparent; border: solid 0px #FFF;" maxlength="100" name="site"/>
</div>
And also check that you have the dimensions on the css correctly defined.
__________________

www.gusmayo.com
- Maybe a story or two -


www.jaloobie.com
... your new home ...

www.webinkproductions.com
- professional web application design -
GoldNetX is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-28-2005   #5 (permalink)
Invicible Snake
 
ParaSnake's Avatar
 
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668

Send a message via MSN to ParaSnake Send a message via Yahoo to ParaSnake
If i were you Vicious,i will click "View - Page Source" lolz
__________________
ParaSnake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-28-2005   #6 (permalink)
Registered User
 
ViciOuS's Avatar
 
Join Date: Apr 2005
Posts: 82

It works!

Thanks a bunch GoldNetX. Now to get the input centered in the bg image.

Quote:
Originally Posted by ParaSnake
If i were you Vicious,i will click "View - Page Source" lolz
You trying to say that BR uses images for input fields too?.. I don't see any.
ViciOuS is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-28-2005   #7 (permalink)
Recursively call who?
 
GoldNetX's Avatar
 
Join Date: Nov 2003
Location: Pittsburgh, PA
Posts: 294

Send a message via AIM to GoldNetX
No problem, my pleasure to help out.
__________________

www.gusmayo.com
- Maybe a story or two -


www.jaloobie.com
... your new home ...

www.webinkproductions.com
- professional web application design -
GoldNetX is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-29-2005   #8 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ to scrowler
nice work goldnetx, rep+
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Identifying Fake Images Man1c M0g Announcements 0 08-24-2005 10:16 PM
Overlapping Images: Putting images on top of another jasonchan483 Adobe Photoshop 5 07-30-2005 11:29 AM
Putting images in MySql Uncle Ghed HTML / PHP / ASP / JS 6 07-21-2005 11:09 AM
Help: Making images links (it isn't what you think...read) kp606-Epsilon Adobe Photoshop 2 07-15-2004 02:14 PM
blending two external images into each other LimitLess Flash & Dynamic Media 20 07-04-2004 07:53 PM


All times are GMT +1. The time now is 05:24 PM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT