468,765 Members | 1,657 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

input tag within table/td border missing right border

14
How do I get IE and Mozilla to show the right border for an input tag.
for the following table
Everything looks great until I add the doctype tag.
I can get IE to work by adding the following.

table.resizable td{
overflow: hidden;
padding-right:6px.
}

This does not seem to work for Mozilla.
Any help would be greatly appreciated.

Steve
[HTML]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>css demo</TITLE>
<style type="text/css">

table.resizable{
table-layout:fixed;
}

table.resizable th{
text-align:left;
overflow: hidden;
}

table.resizable td{
overflow: hidden;
}

table.resizable input{
width:100%;
}

table.resizable textarea{
width:100%;
}


</style>

</HEAD>
<BODY>

<TABLE border="1" class="resizable">
<THEAD>
<TR>
<TH width="50px">name</TH>
<TH style="width:60px">input</TH>
</TR>
</THEAD>
<TBODY>
<TR>
<TD>name</TD>
<TD><input type="text" value="this is a very long text string, this is a very long text string"></TD>
</TR>

<TR>
<TD>name</TD>
<TD><input type="text" value="this is a very long text string, this is a very long text string"></TD>
</TR>

<TR>
<TD>name</TD>
<TD><input type="text" value="this is a very long text string, this is a very long text string"></TD>
</TR>

<TR>
<TD>name</TD>
<TD><input type="text" value="this is a very long text string, this is a very long text string"></TD>
</TR>
</TBODY>
</TABLE>
</BODY>
</HTML>
[/HTML]
Nov 22 '07 #1
2 2709
drhowarddrfine
7,435 Expert 4TB
Everything looks great until I add the doctype tag.
Of course. You changed the rules. The doctype is the definition of the tags and elements. Without one, the browser gets to choose what to do. With a doctype, you follow the standard rules, which are different. IE, specifically, does a horrible job of following the standard and, without a doctype, goes into what is called "quirks mode".

When I sit down to write a web page, the very first thing I do is enter the doctype. Nay, I have a template with a strict doctype already there for me. It is the very first thing EVERY page is REQUIRED to have before you do ANYTHING.

Now I'll look at your page.
Nov 22 '07 #2
drhowarddrfine
7,435 Expert 4TB
Something to add. There is NO need for a new web page to use a transitional doctype. The only thing I can think of is if you are from 1998 and just woke from a deep sleep and don't know how to write 2007 markup. Always use a strict doctype.

I don't see any difference between IE and Firefox with the markup you've given.
Nov 22 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Mary Ellen Curtin | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.