HighDots Forums  

Overly tall <input type=text> despite setting height.

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Overly tall <input type=text> despite setting height. in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
test9991014@yahoo.com
 
Posts: n/a

Default Overly tall <input type=text> despite setting height. - 03-20-2008 , 08:32 AM






Hi all,

I have an <input type=text> tag that is taking up too much space
vertically. It's in a <td> that has a fixed height, and I've set the
height value in the <input>'s style to be 10px, less than the <td>'s
height which is set to 14 using a normal "height=14" parameter.
For some reason the <input> is taking up the entire vertical space
of the <td>, which I know because I set <td bgcolor=red>.
I can see the input area which is about 10 pixels high and then
4 rows of gray pixels.

To summarize:
<td valign="center" bgcolor="red" height="14">
<input type="text" style="height: 10px; font-size: 7pt;">
</td>

So the puzzle is:
I should see at least 4 rows of red pixels total, but I do not.
Why is this not working as one might, on the face of it, expect?

Thanks.

Reply With Quote
  #2  
Old   
test9991014@yahoo.com
 
Posts: n/a

Default Re: Overly tall <input type=text> despite setting height. - 03-20-2008 , 09:06 AM







Quote:
td valign="center" bgcolor="red" height="14"
input type="text" style="height: 10px; font-size: 7pt;"
/td
I've discovered that changing bgcolor="red"
to style="background:red" fixes the problem.


Reply With Quote
  #3  
Old   
Bergamot
 
Posts: n/a

Default Re: Overly tall <input type=text> despite setting height. - 03-20-2008 , 09:24 AM



test9991014 (AT) yahoo (DOT) com wrote:
Quote:
input type="text" style="height: 10px; font-size: 7pt;"
I take it you don't care if the visitor can actually read what they're
typing.

Your specified height is exactly half my default font size. When my
enforced minimum font size overrides that puny 7pt, I'll only see a few
pixels of the tops of letters. This is very poor design.

If you're going to set a height, use em units so it will adjust with the
visitor's text size. And never use pt units for screen display. pt is a
print measurement and has no meaning on screen. Use % or em for font
sizes. This subject has been done to death so check the newsgroup
archives for more of that discussion.

--
Berg


Reply With Quote
  #4  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Overly tall <input type=text> despite setting height. - 03-20-2008 , 10:07 AM



test9991014 (AT) yahoo (DOT) com wrote:
Quote:
td valign="center" bgcolor="red" height="14"
input type="text" style="height: 10px; font-size: 7pt;"
/td

I've discovered that changing bgcolor="red"
to style="background:red" fixes the problem.
Your multiple posts reveal that you are floundering about here. Instead
of being a code monkey and throwing odd bits of code at your browser
like pasta and seeing what sticks, why not learn the basics first.

Go to http://www.htmldog.com (not affiliated, just that they have good
tutorials) and work your way through the basic HTML and CSS tutorials.
In the end it will save you *a lot* of time and frustration.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #5  
Old   
test9991014@yahoo.com
 
Posts: n/a

Default Re: Overly tall <input type=text> despite setting height. - 03-20-2008 , 10:59 AM



On Mar 20, 10:07 am, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote:

Quote:
Go tohttp://www.htmldog.com(not affiliated
The problem is that HTML & CSS are badly designed
and official documentation is poor. And the half-hearted
attempts at explaining them that you see at various
small websites usually don't provide anything except overly
general or easy examples, perhaps because those websites
are themselves merely intended to get hits and ad-clicks
rather than to educate. The only chance of finding an answer
to an esoteric question in a timely way is to ask fellow
"code monkeys."


Reply With Quote
  #6  
Old   
Bergamot
 
Posts: n/a

Default Re: Overly tall <input type=text> despite setting height. - 03-20-2008 , 11:29 AM



test9991014 (AT) yahoo (DOT) com wrote:
Quote:
On Mar 20, 10:07 am, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote:

Go tohttp://www.htmldog.com(not affiliated

The problem is that HTML & CSS are badly designed
and official documentation is poor. And the half-hearted
attempts at explaining them that you see at various
small websites
I guess that means you have not bothered going to the suggested web site.

Quote:
The only chance of finding an answer
to an esoteric question in a timely way is to ask fellow
"code monkeys."
Maybe you don't mean it this way, but it sounds more like you don't want
to take the time to actually learn that which you are attempting to use.
You'd save yourself a lot of time in the future if you took a little
time now to educate yourself.

Nobody here wants to spoon feed answers to someone who isn't willing to
put in a little effort themselves.

--
Berg


Reply With Quote
  #7  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Overly tall <input type=text> despite setting height. - 03-20-2008 , 11:33 AM



test9991014 (AT) yahoo (DOT) com wrote:
Quote:
On Mar 20, 10:07 am, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote:

Go tohttp://www.htmldog.com(not affiliated

The problem is that HTML & CSS are badly designed
and official documentation is poor. And the half-hearted
attempts at explaining them that you see at various
small websites usually don't provide anything except overly
general or easy examples, perhaps because those websites
are themselves merely intended to get hits and ad-clicks
rather than to educate. The only chance of finding an answer
to an esoteric question in a timely way is to ask fellow
"code monkeys."
Did you go to the site? Am I trying to drive traffic to htmldog to up
their hitcount? No. It is just the best site I have found so far that
*does* explain clearly and accurately how to built web pages in a modern
and effective way. It is the wheat among the chaff. If you doubt it I am
sure many of the competent regulars here will pipe in to confirm my
assertion. I can also assert that the path you are now pursuing will be
accompanied by much frustration and wasted time, and probably no get you
much closer to your goal.

BTW: HTML is very easy and simple to understand. For most practice only
about a dozen elements you will use. CSS is a bit more complicated and
less intuitive in places and in practice is made more complicated
because of IE's poor in inconstant support.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #8  
Old   
test9991014@yahoo.com
 
Posts: n/a

Default Re: Overly tall <input type=text> despite setting height. - 03-20-2008 , 11:54 AM



On Mar 20, 11:29 am, Bergamot <berga... (AT) visi (DOT) com> wrote:

Quote:
Nobody here wants to spoon feed answers to someone who isn't willing to
put in a little effort themselves.
You presume I haven't searched so that you can pretend
I'm making an unreasonable request of you, when in truth
you are the last person I'd ask because you obviously
aren't mature enough to deal with strangers.



Reply With Quote
  #9  
Old   
test9991014@yahoo.com
 
Posts: n/a

Default Re: Overly tall <input type=text> despite setting height. - 03-20-2008 , 12:18 PM



On Mar 20, 11:12 am, Toby A Inkster <usenet200... (AT) tobyinkster (DOT) co.uk>
wrote:

Quote:
HTMLDog.com is certainly not that. It's a great tutorial.
It's better than most, I'll agree, but remember
I stated my question was esoteric.

In the end, I did what Jonathan discouraged: I experimented
like a "code monkey" and found the answer.



Reply With Quote
  #10  
Old   
Bergamot
 
Posts: n/a

Default Re: Overly tall <input type=text> despite setting height. - 03-20-2008 , 12:25 PM



test9991014 (AT) yahoo (DOT) com wrote:
Quote:
On Mar 20, 11:12 am, Toby A Inkster <usenet200... (AT) tobyinkster (DOT) co.uk
wrote:

HTMLDog.com is certainly not that. It's a great tutorial.

It's better than most, I'll agree, but remember
I stated my question was esoteric.
Esoteric? Not hardly. If you took the time to actually learn HTML and
CSS you wouldn't have needed to ask at all.

Quote:
In the end, I did what Jonathan discouraged: I experimented
like a "code monkey" and found the answer.
Hacking away without understanding is a sure way to make a broken page.
It's your loss (or your client's), not ours.

--
Berg


Reply With Quote
Reply




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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.