Textbox

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Goofan
Forum Contributor
Posts: 305
Joined: Wed Nov 04, 2009 2:11 pm
Location: Sweden

Textbox

Post by Goofan »

Hi!
How do u do a textfield? Got any Ide´s? I got this idé from this webbsite

Got any tuturials about making something like this? any thing to read up on ...?
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: Textbox

Post by kaszu »

Not sure what exactly you meant with "Textbox". Have a look:
TEXTAREA
INPUT with type="text"
User avatar
Goofan
Forum Contributor
Posts: 305
Joined: Wed Nov 04, 2009 2:11 pm
Location: Sweden

Re: Textbox

Post by Goofan »

Yea thats more or less it!

However how do u color the background of the input...? =)
User avatar
hypedupdawg
Forum Commoner
Posts: 74
Joined: Sat Apr 10, 2010 5:21 am

Re: Textbox

Post by hypedupdawg »

You can use css styles on all the inputs by using this syntax:

Code: Select all

input[type=text] { 
width: 300px; 
background-color: cyan; 
}
You could then replace "text" with any other input.

Have fun designing!
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: Textbox

Post by kaszu »

input[type=text] doesn't work in IE6, instead you should assign a class to input and use that

Code: Select all

<input type="text" class="text-input" />

Code: Select all

input.text-input {
    /* Your CSS here */
}
User avatar
hypedupdawg
Forum Commoner
Posts: 74
Joined: Sat Apr 10, 2010 5:21 am

Re: Textbox

Post by hypedupdawg »

Arghhh! Doe IE6 do this for every input/output type, or is it just this specific one? Are there any other class type things that it won't pick up?
User avatar
Goofan
Forum Contributor
Posts: 305
Joined: Wed Nov 04, 2009 2:11 pm
Location: Sweden

Re: Textbox

Post by Goofan »

ohh yea another question... how do u do so it allways are at a specific position?

Exampel if u scroll down its still at the top... =)
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: Textbox

Post by kaszu »

@hypedupdawg IE6 doesn't support attribute selectors. See http://www.quirksmode.org/css/contents.html
@Goofan You can do it with position: fixed; but that doesn't work in IE6, so for it you have to use a workaround http://www.google.com/search?source=ig& ... ixed%20ie6
User avatar
hypedupdawg
Forum Commoner
Posts: 74
Joined: Sat Apr 10, 2010 5:21 am

Re: Textbox

Post by hypedupdawg »

thanks very much... its nice to know before I implement any of this stuff, so I don't have to do it twice... :banghead:
Post Reply