473,386 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Table with input width 100%

Hi,

Could anyone explain the behaviour of my simple table at
http://www.xs4all.nl/~rvanloen/examp...le1/table.html

The css is located at:
http://www.xs4all.nl/~rvanloen/examp...s/webstyle.css

I would like to know why the input element is too big.
It sticks out in firefox and is cut off by the cell in IE6.

Both the HTML and CSS file have been validated.

What I was trying to accomplish is making a centered input box with
maximum width to fit in the cell with some padding left and right to it.

Robert.
Aug 30 '05 #1
3 11794


Robert wrote:
Could anyone explain the behaviour of my simple table at
http://www.xs4all.nl/~rvanloen/examp...le1/table.html

The css is located at:
http://www.xs4all.nl/~rvanloen/examp...s/webstyle.css

I would like to know why the input element is too big.
It sticks out in firefox and is cut off by the cell in IE6.


Looking at the computed styles with the DOM inspector of Firefox I see
for the input:
width 299px
border-left-width 2px
border-right-width 2px
The containing td has
width 298px
--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 30 '05 #2
Robert wrote:
Hi,

Could anyone explain the behaviour of my simple table at
http://www.xs4all.nl/~rvanloen/examp...le1/table.html

The css is located at:
http://www.xs4all.nl/~rvanloen/examp...s/webstyle.css

I would like to know why the input element is too big.
It sticks out in firefox and is cut off by the cell in IE6.


For Firefox: IIRC you have to add the border-width to the field-width. Here
the border seems to be 1 or 2 pixels on each side of the field. So the
field overlaps by 2 (or 4) Pixels outside the td.

For IE: I think the field is not cut off, but the border of the field
exactly covers the border of the td. (I had expected that IE would keep the
field completely inside the td, because this browser does sum the border to
the element's width.)

Gert

Aug 30 '05 #3
Martin Honnen wrote:


Robert wrote:
Could anyone explain the behaviour of my simple table at
http://www.xs4all.nl/~rvanloen/examp...le1/table.html


Looking at the computed styles with the DOM inspector of Firefox I see
for the input:
width 299px
border-left-width 2px
border-right-width 2px
The containing td has
width 298px


Thanks. I thought width included the border. So that would explain it.
Aug 31 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Sims | last post by:
Hi, This will validate, (http://validator.w3.org/) <form method="POST" action="" name='xForm' style='background:inherit;'> <table style='background:inherit; width:100%;'> <tr width=80%> <td>...
25
by: kie | last post by:
hello, i have a table that creates and deletes rows dynamically using createElement, appendChild, removeChild. when i have added the required amount of rows and input my data, i would like to...
8
by: F. Da Costa | last post by:
Following is a snippet of html in which I hide a whole table and try to hide a single row. Here is my question (plz don't chew my head off if its css related instead): Why does the divTable...
4
by: Kim14 | last post by:
I have a table that works fine in IE, but doesn't work in Netscape or Firefox. It should automatically come up with numbers in some of the fields and depending what is entered, it should calculate...
0
by: javaguy | last post by:
I have a table I hide show/hide through a pair of divs. The show/hide part works fine in both Mozilla and MSIE. When switching between the hide and show versions the Mozilla browser keeps them in...
5
by: benyovi | last post by:
Hi I got this table and i need to get the data of "cbIsInUse" if checked or not for every row. how do i do that ?? thanks Amir <table id="fieldsTable" width="100%" border="0" cellspacing="0">...
3
by: cbradio | last post by:
Hi, I am having trouble developing a form in a restricted environment. My sample code is found below my message (sorry I don't have a URL). Basically, without a doctype, the form displays properly...
1
Merlin1857
by: Merlin1857 | last post by:
How to search multiple fields using ASP A major issue for me when I first started writing in VB Script was constructing the ability to search a table using multiple field input from a form and...
1
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot...
4
by: lilOlMe | last post by:
Hi there! I'm developing a "scrollable table". At first I started using CSS. It worked pretty well until I found a bug that happens when placing this table into a tabbing control... So I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.