473,396 Members | 1,755 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,396 software developers and data experts.

Form element in DIV - 1px indent top and bottom in IE

12
hi all,

take a look to the file.



this is form in table, located in DIV layer.

on the left is FF and on the right is IE.
as You see, FF displays it correctly and IE has 1px on the top and bottom.

here is my code:

Expand|Select|Wrap|Line Numbers
  1. <div align="center">
  2. <div style="width:600px; margin:0px; padding:0px">
  3.  
  4. <table cellpadding="0" cellspacing="0" style="width:560px; border: 1px solid black; border-collapse:collapse">
  5.  
  6. <tr style="height:15px; border: 1px solid black">
  7. <td style="height:15px; width:15px; border: 1px solid black"></td>
  8. <td style="height:15px; border: 1px solid black; vertical-align:middle">
  9.  
  10. <form action="" style="padding:0px; margin:0px; display:block"><input type="text" maxlength="40" style="width:100px; height:15px; border: 1px solid black; padding:0px; margin:0px; display:block" />
  11. </form>
  12.  
  13. </td>
  14. <td style="height:15px; border: 1px solid black"></td>
  15. </tr>
  16. </table>
  17. </div>
  18. </div>
  19.  
what can You suggest, please?
May 8 '07 #1
2 2409
hi all,

take a look to the file.



this is form in table, located in DIV layer.

on the left is FF and on the right is IE.
as You see, FF displays it correctly and IE has 1px on the top and bottom.

here is my code:

Expand|Select|Wrap|Line Numbers
  1. <div align="center">
  2. <div style="width:600px; margin:0px; padding:0px">
  3.  
  4. <table cellpadding="0" cellspacing="0" style="width:560px; border: 1px solid black; border-collapse:collapse">
  5.  
  6. <tr style="height:15px; border: 1px solid black">
  7. <td style="height:15px; width:15px; border: 1px solid black"></td>
  8. <td style="height:15px; border: 1px solid black; vertical-align:middle">
  9.  
  10. <form action="" style="padding:0px; margin:0px; display:block"><input type="text" maxlength="40" style="width:100px; height:15px; border: 1px solid black; padding:0px; margin:0px; display:block" />
  11. </form>
  12.  
  13. </td>
  14. <td style="height:15px; border: 1px solid black"></td>
  15. </tr>
  16. </table>
  17. </div>
  18. </div>
  19.  
what can You suggest, please?
is this all your code? are you using a style sheet at all? i would put all your styling in a style sheet and attach it to the page. include the following code at the top of your css and it will help alot.

Expand|Select|Wrap|Line Numbers
  1. *{
  2. margin:0;
  3. padding:0;
  4. border:0;
  5. }
if that doesnt work then post both your css and html up here.

cheer
philleep
May 8 '07 #2
jhardman
3,406 Expert 2GB
A form inside a table inside a div? why bother? remove the table and the div and do all the positioning with css. It's cleaner, loads faster, and more likely to be interpreted the same in all browsers.

Jared
May 9 '07 #3

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

Similar topics

3
by: NWhite | last post by:
Hi all, I'm trying to indent <li> items using: li { margin: 0 0 0 50px;} So I expect something like the following to indent 50 pixels from the left margin:
2
by: Xah Lee | last post by:
is there a way to do negative indent for paragraphs, as in a dialogues? (i.e. in Microsoft word, drag the top margin triangle to the left, bottom to the right, then press tab after each person's...
1
by: Christopher P. Winter | last post by:
I'm seeing some unexpected behavior with Text-indent, as shown on this page: http://www.chris-winter.com/Digressions/HP_Kayak/My_Kayak.html I set up the following style rules for footnotes: ...
5
by: MLibby | last post by:
How can you tell when you've reached an elements end tag? For example, how can the following code tell that <MenuItem Label="Overview" ClientSideOnClick="CacheDemo/IntroToCache.ascx"/> has an end...
11
by: TokyoJ | last post by:
I run a small camp in Alaska for kids and my director is asking for a web form. Could someone please have a look and offer some advice on where I'm making mistake(s)? I'm using the RegExp function...
9
by: whisher | last post by:
Hi. I've managed this simple snippet: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Register</title> <meta...
18
by: Diogenes | last post by:
Hi All; I, like others, have been frustrated with designing forms that look and flow the same in both IE and Firefox. They simply did not scale the same. I have discovered, to my chagrin,...
9
by: angi35 | last post by:
Hi - In Access 2000, I'm trying to create a switchboard so users can open a certain form with different filters. I thought I would use an option group with toggle buttons. I suppose it could be...
4
by: AAaron123 | last post by:
<body runat="server" id="MainBody"> <form id="form1" runat="server" style="background-color:green; width: 100%; height: 100%"> <br /> Table1" runat="server" Style="background-color:Yellow;...
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:
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.