Jump to content

Bigger input field?


eduard

Recommended Posts

Now the code is allright, but how do I get a bigger input field for ´description´?<html><body><form>Description: <input type="text" name="description" ><br />Price: <input type="text" name="Price" id="Price" /><br />Quantity: <input type="text" name="Quantity" id="quantity" /></form></body></html>

Link to comment
Share on other sites

Use the height and width CSS properties and a textarea.

<textarea id="description" name="description"></textarea>

textarea#description {width: 95%;height: 200px;}

Link to comment
Share on other sites

Use the height and width CSS properties and a textarea.
<textarea id="description" name="description"></textarea>

textarea#description {width: 95%;height: 200px;}

Thanks!
Link to comment
Share on other sites

<form>Description: <input type="text" name="description" ><br />Price: <input type="text" name="Price" id="Price" /><br />Quantity: <input type="text" name="Quantity" id="quantity" /></form>
this field is "input" so textarea will not work.The description input does not have an id or a class so you need to find a way to target it in CSS
Description: <input type="text" name="description" id="desc" ><br />

and CSS

input #desc{width=100px;  /*adjust width as required*/}

I would nto specify the height that way it will be the height of the text.Guy

Link to comment
Share on other sites

this field is "input" so textarea will not work.The description input does not have an id or a class so you need to find a way to target it in CSS
Description: <input type="text" name="description" id="desc" ><br />

and CSS

input #desc{width=100px;  /*adjust width as required*/}

I would nto specify the height that way it will be the height of the text.Guy

I don´t manage!Where do I have to write the CSS?<html><head>input #desc{width=100px;</head><body><form>Description: <input type="text" name="description" id="desc"><br />Price: <input type="text" name="Price" id="Price" /><br />Quantity: <input type="text" name="Quantity" id="quantity" /></form></body></html>
Link to comment
Share on other sites

I saw the example, but still it doesn´t work!<html><head><style type="text/css">input #desc{width="100px";}</style></head><body><form>Description: <input type="text" name="description" id="desc"><br />Price: <input type="text" name="Price" id="Price" /><br />Quantity: <input type="text" name="Quantity" id="quantity" /></form></body></html>
Link to comment
Share on other sites

Come on, Eduard. By this point, you should be able to spot the error with this:input #desc{width="100px";}EDIT:I also just notice that your selector is a little bit off. You have a space in there that shouldn't be. Try one of these two (either will work):input#desc <--Notice no space between input and #descor#desc

Link to comment
Share on other sites

I saw the example, but still it doesn´t work!<html><head><style type="text/css">input #desc{width="100px";}</style></head><body><form>Description: <input type="text" name="description" id="desc"><br />Price: <input type="text" name="Price" id="Price" /><br />Quantity: <input type="text" name="Quantity" id="quantity" /></form></body></html>
you're CSS is wrong, you use a colon between attributes and values, not an equals signs.
Link to comment
Share on other sites

Come on, Eduard. By this point, you should be able to spot the error with this:input #desc{width="100px";}EDIT:I also just notice that your selector is a little bit off. You have a space in there that shouldn't be. Try one of these two (either will work):input#desc <--Notice no space between input and #descor#desc
It still doesn´t work!<html><head><style type="text/css">#desc{width=200px;}</style></head><body><form>Description: <input type="text" name="description" id="desc"><br />Price: <input type="text" name="Price" id="Price" /><br />Quantity: <input type="text" name="Quantity" id="quantity" /></form></body></html>
Link to comment
Share on other sites

um...did you actually read our replies? Or just read them and ignore them?

Come on, Eduard. By this point, you should be able to spot the error with this:input #desc{width="100px";}
you're CSS is wrong, you use a colon between attributes and values, not an equals signs.
Link to comment
Share on other sites

I don´t manage!Where do I have to write the CSS?<html><head>input#desc{width=100px;</head><body><form>Description: <input type="text" name="description" id="desc"><br />Price: <input type="text" name="Price" id="Price" /><br />Quantity: <input type="text" name="Quantity" id="quantity" /></form></body></html>
there are three mistakes - two are mine :-(
<head>input #desc   /*no spaces*/{width:100px;   /*replace "=" with ":"*/}	 /*need close bracket here*/</head>

now this works in chrome, opera, ff and safari. I never have the energy to test in all IE versions.Guy

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...