By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,521 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,521 IT Pros & Developers. It's quick & easy.

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

P: n/a
Hi all,

I have an <input type=texttag that is taking up too much space
vertically. It's in a <tdthat 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 <inputis 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.
Mar 20 '08 #1
Share this Question
Share on Google+
10 Replies


P: n/a
<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.
Mar 20 '08 #2

P: n/a
te*********@yahoo.com wrote:
><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
Mar 20 '08 #3

P: n/a
On Mar 20, 11:29 am, Bergamot <berga...@visi.comwrote:
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.

Mar 20 '08 #4

P: n/a
te*********@yahoo.com wrote:
Bergamot <berga...@visi.comwrote:
>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.
Thanks! I needed a good laugh today!

--
-bts
-Friends don't let friends drive Vista
Mar 20 '08 #5

P: n/a
On Mar 20, 11:12 am, Toby A Inkster <usenet200...@tobyinkster.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.

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

Mar 20 '08 #6

P: n/a
te*********@yahoo.com wrote:
On Mar 20, 11:12 am, Toby A Inkster <usenet200...@tobyinkster.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.
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
Mar 20 '08 #7

P: n/a
te*********@yahoo.com wrote:
On Mar 20, 11:12 am, Toby A Inkster <usenet200...@tobyinkster.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.

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

<input type="text" style="height: 10px; font-size: 7pt;">

was your result and

and you do not understand the ramifications of CSS

"background: red"

then, no, you have not "found the answer"

That is why I suggested that you do find the answers and learn a little
about what you are attempting. My good advice was to let you know that
htmldog's tutorials are good and will help you.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Mar 20 '08 #8

P: n/a
On 20 Mar 2008, wrote:
On Mar 20, 11:12 am, Toby A Inkster <usenet200...@tobyinkster.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.

In the end, I did what Jonathan discouraged: I experimented
like a "code monkey" and found the answer.
Well, just remember that spankin' it doesn't provide the same lasting
satisfaction as would delving properly into the meat of the matter.

--
Neredbojias
http://www.neredbojias.com/
Great sights and sounds
Mar 20 '08 #9

P: n/a
In article
<f4**********************************@8g2000hsu.go oglegroups.com>
,
te*********@yahoo.com wrote:
I experimented
like a "code monkey" and found the answer.
Ah, but thar's the rub. You found something working to your
satisfaction after you did something. But what has been learned?
How much generality?

There is a measure, it will vary somewhat between people, which
is called EEI, it is a measure of the efficiency in the long run
of any strategy for doing something well. The measure records
better results when there is a goodly bit of generalization
involved rather than hitting keys and now and then to get a line
of sense.

--
dorayme
Mar 20 '08 #10

P: n/a
te*********@yahoo.com wrote:
On Mar 20, 11:12 am, Toby A Inkster <usenet200...@tobyinkster.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.

In the end, I did what Jonathan discouraged: I experimented
like a "code monkey" and found the answer.
It doesn't appear that you did.

In your original post you said you get 4 rows of gray pixels. Why would
you have gray at all? You didn't specify anything to be gray (unless you
did it someplace you didn't show us--in which case, you are advised that
when you ask for debugging help, you need to present all the information
you have--if you can't figure it out, how can we, with only a fraction
of the information you have?).

In any event, I have no gray. I created a page with two tables, one with
TDs as in your original post, and one with TDs adjusted as in your
follow-up. In both cases the two tables look identical. So if you had
gray originally, and the gray turned to red when you switched from the
first formulation to the second, then you changed something else to,
whether you're aware of it or not.

In the second place, your original trouble report was that the 10px-high
INPUT boxes were taking up the entire vertical space of the 14px-high
TDs--and then you reported that the INPUT boxes were taking up 10 rows
of pixels, leaving 4 other rows--whether gray or red, it doesn't
matter--which implies that 4 pixels of the TD were above and beyond the
vertical space taken up by the INPUT, contradicting your complaint.

So in the end, I don't know what was really happening on your end, I
don't know what your code really looked like before or after, I don't
know what you changed in the code, and I don't know what it is you think
you fixed or what you think you learned. Let's just say that if
something like this happens again, where you think something is taking
up too much vertical space, and you think the fix is to replace a
bgcolor attribute with a CSS background: red; well, it won't be.
Mar 20 '08 #11

This discussion thread is closed

Replies have been disabled for this discussion.