Forum Moderators: phranque

Message Too Old, No Replies

height attribute

         

specter

10:37 am on Feb 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi guys,

I'm editing an automated form to email someone.
This form is composed of five text fields,each one of wich originated from a html string like this:

<input name=x type=text size=35>

where the "size" attribute defines the width of the field.
Now,what I would to do is to modify the height of the field by adding the corresponding attribute but I don't know what it is:I tried with "height" but nothing happens...maybe a css would work,but I'm not sure where and how to place it...
Could anyone,please,help me?

Thanks in advance

Sincerely

adamnichols45

1:57 pm on Feb 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you can use css for that.

.hello {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
height: 20;
}

and then

<input type="text" name="a" class="hello">

specter

5:26 pm on Feb 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for your reply!
However it doesn't work.Maybe I make something wrong in declaring css elements because the css string you provided me appears in the page as a text...

encyclo

6:29 pm on Feb 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try:

.hello {
height: 20[b]px[/b];
}

(there's a typo in the above example). The CSS is placed between

<style type="text/css"></style>
tags, or linked from a separate file, both within the
head
section of your page. You can also alter the height inline:

input type="text" name="a" [b]style="height:20px;"[/b]>

kaled

7:03 pm on Feb 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not certain, but I believe that the CSS height property is ignored for all inline elements.

Try forum83.

Kaled.

adamnichols45

7:13 pm on Feb 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i have done that before using css - It will work and you can also change the colours of the box's etc

celgins

11:43 pm on Feb 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The CSS height attribute isn't ignored for inline elements. I use it often when writing HTML/CSS.

Try Encyclo's example - that should work.