English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I need to know the exact CSS coding for a textbox, and I need it to have coding in it where I can change the location. I've been looking in a bunch of books for this, but I can only find HTML, and I need CSS.

2007-10-28 08:59:20 · 3 answers · asked by Ryan 1 in Computers & Internet Programming & Design

3 answers

You cannot make a "textbox" with CSS alone. CSS controls the style of elements, but does not create elements.

http://www.w3schools.com/css

2007-10-28 09:08:52 · answer #1 · answered by Anonymous · 2 0

I borrowed this from Dev Shed, http://forums.devshed.com/css-help-116/align-textbox-with-css-57646.html
hope its what you are asking. (I changed it some and added the last paragraph just to make just a box with text in it in case you were not talking about a form element.)





Untitled Document








Lorem ipsum dolor sit amet, consectetuer adipiscing elects, sed diam

nonummy nibh euismod tincidunt C laoreet dolore magna aliquam

erat volutpat. C wisi enim AD minim veniam, quis nostrud exerci



This is a box with out input ability just a box with text in it.






Cut and paste that into an empty html doc or to notepad and save it as html to see the result in placement etc.
You basically want to style FORM elements when you are talking about textbox.

There are literally hundreds of great tips and tricks for CSS with form elements. Even using background images etc.
Try a couple of these sites. (do a search for "css form styling")
http://www.cssplay.co.uk/menu/form.html --- one of my favorites
http://www.dynamicdrive.com/style/csslibrary/item/css-tableless-form/
http://www.sitepoint.com/article/fancy-form-design-css
and last and entirely worth reading.
http://www.alistapart.com/articles/prettyaccessibleforms

That should get you fixed. Notice the "float:left;" or "float:right;) that is the clue to positioning you can also set padding or margins or use absolute positioning (not a great idea but maybe) Good luck.

2007-10-28 10:11:17 · answer #2 · answered by Tracy L 7 · 0 1

oh you mean the formating, eg the STYLE of how it looks and etc... there are several types of atributes to this

textarea{
/// ATRIBUTES
}
input{
atributes
}

they usally consist of

border
width
height
font

which you should go to w3schools as suggested above to understand how to use them more clearley.

2007-10-28 09:27:09 · answer #3 · answered by Fitz 4 · 1 1

fedest.com, questions and answers