473,473 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

IE7 Space/gap Issue

Frinavale
9,735 Recognized Expert Moderator Expert
I am so frustrated with IE7 right now.

I have a JavaScript class that dynamically generates the HTML for a client-side tab control based on the some JSON Objects that I created server side. The JavaScript generates a table with one row in it, where each <td> is a tab.

Right now the style for the table is as follows:
Expand|Select|Wrap|Line Numbers
  1. display:inline-table;
  2. height:100%;
  3. margin: 0px;
  4. padding:0px;
I have a <div> that contains the content for the tabs. It is located right under the table and also has a margin style of 0px.

In every other browser this looks fine...but in IE7 there is a space between the table containing the tabs and the <div> containing the content and it's driving me crazy.

The worst part about this is that the space only occurs if I place the tabs-table and the tab-content-div inside a <div> to be able to display the group correctly (I want to put a margin around it so that the tabs and content aren't flush with the containing element). The space appears even if this wrapper div doesn't have any style attributes.

If I don't include the wrapper div there is no gap.

I think this has something to do with the way IE7 handles padding/margins in combination with the width style...but I just can't figure out how to get what I want in this horrible browser.

I don't expect anyone to be able to help me figure out how to get rid of the space (the html is too complicated to post) but I was hoping to find some sort of HTML/CSS debuging tool that I can use because the one that comes with IE8 is useless when it comes to dynamically generated HTML via JavaScript (I'm using the compatibility view to get "IE7") and I hate having to recompile my server code every time I want to test a style change.

Looking forward to hearing your suggestions,

-Frinny
Jan 8 '10 #1
4 3561
Frinavale
9,735 Recognized Expert Moderator Expert
I fixed my problem.

The dynamically generated table was placed into a <div> that was serving as a placeholder for the tabs. I changed the style of this <div> to be display:inline instead of the default "block". This forced me to change most of my CSS since you can't set the height and width of inline items. Also, apparently, when you set a div to have a display:inline the text-align style no longer applies to the contents within the div...which is annoying. All of my "general tab styling" had to be moved into the specific styles for the selected and unselected tab (including height and text-align).

IE is so annoying!

I'm still very interested to hear of a debugging tool that will let me debug CSS issues for dynamic elements.

-Frinny
Jan 8 '10 #2
drhowarddrfine
7,435 Recognized Expert Expert
Didn't have time to read through all that. display:inline-block helpful?

Hardly ever use IEs debug thingy.
Jan 8 '10 #3
Frinavale
9,735 Recognized Expert Moderator Expert
I fixed the bug but I'm still looking for a debugger for the future.
Jan 8 '10 #4
drhowarddrfine
7,435 Recognized Expert Expert
IE won't be around much longer so it won't matter anyway.
Jan 8 '10 #5

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

Similar topics

28
by: Andreas Prilop | last post by:
Jukka reports on http://www.cs.tut.fi/~jkorpela/chars/spaces.html that Internet Explorer 6 fails on the "zero width space" U+200B ​ Is this observation still valid? For which versions of MS...
2
by: stephenvoss | last post by:
I'm currently redesigning my site and have noticed a weird issue w/ IE6. Basically, it's adding too much vertical space between elements. Here's the front page:...
27
by: Aurangzeb M. Agha | last post by:
I'm running Postgres 7.1.3, and just started having a problem where my dynamic site is going down (read-only DB, with no writes happening to the DB) regularly (every other day). I have no idea...
11
by: kenneth | last post by:
I just ran across this. #1 <DBColumn> 1 </DBColumn> #2 <DBColumn> </DBColumn> The data for #1 will be parsed and returned as " 1 ". I get a sequence of...
6
by: DH | last post by:
I have a VERY basic question about figuring database size. I've inherited a database which is generally similar to this basic one: Item, Red, Blue, Green, Yellow (text), (int),(int),(int),(int)...
5
by: Stu Carter | last post by:
Hi, ENV: Windows 2003 Server SP1 (+all updates), VS 2003, .Net 1.1 SP1 We've got an ASP.Net web application using State Service. All is fine until we tried to use the app through a virtual...
13
by: Harlan Messinger | last post by:
What rules deal with attribute values with trailing spaces, or tags or attribute values with embedded newlines? Examples below: the HREF with embedded newline, the SRC with trailing spaces, and IMG...
8
by: maroger | last post by:
I'm sure this is a common issue, but I haven't come across anything that works for me thusfar. I am trying to fix my header, which works fine in firefox but has extra space in IE. Here are...
0
by: pmohando | last post by:
DB2 version 7 running on Aix 5.3 platform, we face the problem on paging space keeping on increasing and reaches upto 99% and only solution is server made to restart for every 20 days. DB2 is not...
1
by: Gaurav | last post by:
I am loading an XML file and applying the XSLT using .net 2003 (C#). XSLT will add Space character in the xml. I am using the entity value for space character . it works fine in .net 1.1...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.