473,883 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

seeking explanation for strange 'border-collapse' behavior

Hi,

I have example html below which contains a couple of hidden divs.
However, some of the table borders within these hidden divs are
actually displayed when they should not be.

In my example, I have comments indicating that if I remove the
'border-collapse' attribute for two of the tables within the hidden
divs, my problem is fixed.

However, in my real html page, I need the border-collapse attribute, or
the tables do not display as I would like them too.
Could anyone explain to me what I am doing wrong and how I can get the
divs to be truely hidden without compromising the table display when it
is necessary?

(My example does not make sense; it is just stripped down html to show
the unwanted affect)

Thanks very much for any insight into my problem!!
Irene
p.s. I had nice indents for the display below, but on the page preview
they were lost... sorry

<html>
<body onload="init(); " >
<script language="javas cript">
function init()
{ window.setTimeo ut( initTest, 1000 );
}
function initTest()
{document.getEl ementById( 'div1' ).innerHTML =
document.getEle mentById('div2' ).innerHTML;
}
</script>

<form name="searchFor m">
<table style="border-collapse:collap se;">
<tr>
<td>
<div id="div3">
<table style="border-collapse: collapse; border-bottom: solid thin
Red; border-top: solid thin Red;">
<tr>
<td style="border-right: solid thin Blue;">xxxx</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table style="border-collapse:collap se;">
<tr>
<td>
<div id="div1"></div>
</td>
</tr>
</table>
</form>
<div id="div2" style="visibili ty:hidden">
<table style="border-collapse:collap se;"><!-- if border-collapse is
removed here, div is truely hidden-->
<tr>
<td valign="middle" style="border-top: solid thin Green;"><b><spa n
id="spanID1">12 34</span></b>
</td>
</tr>
</table>
</div>
<div id="div4" style="visibili ty:hidden">
<!-- if border-collapse is removed from table below, div is truely
hidden -->
<table style="border-collapse:collap se; border-bottom: solid thin Red;
border-top: solid thin Red;">
<tr>
<td style="border-right: solid thin Blue;">yyyy</td>
</tr>
</table>
</div>
</body>
</html>

Jul 23 '05 #1
2 4975
Hi again,

I forgot to mention that I am using IE 6.0.

Would anyone know why the border-collapse table attribute is causing
the hidden div to display some of the borders in the example below?

Thanks,
Irene

ir********@yaho o.com wrote:
Hi,

I have example html below which contains a couple of hidden divs.
However, some of the table borders within these hidden divs are
actually displayed when they should not be.

In my example, I have comments indicating that if I remove the
'border-collapse' attribute for two of the tables within the hidden
divs, my problem is fixed.

However, in my real html page, I need the border-collapse attribute, or the tables do not display as I would like them too.
Could anyone explain to me what I am doing wrong and how I can get the divs to be truely hidden without compromising the table display when it is necessary?

(My example does not make sense; it is just stripped down html to show the unwanted affect)

Thanks very much for any insight into my problem!!
Irene
p.s. I had nice indents for the display below, but on the page preview they were lost... sorry

<html>
<body onload="init(); " >
<script language="javas cript">
function init()
{ window.setTimeo ut( initTest, 1000 );
}
function initTest()
{document.getEl ementById( 'div1' ).innerHTML =
document.getEle mentById('div2' ).innerHTML;
}
</script>

<form name="searchFor m">
<table style="border-collapse:collap se;">
<tr>
<td>
<div id="div3">
<table style="border-collapse: collapse; border-bottom: solid thin
Red; border-top: solid thin Red;">
<tr>
<td style="border-right: solid thin Blue;">xxxx</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table style="border-collapse:collap se;">
<tr>
<td>
<div id="div1"></div>
</td>
</tr>
</table>
</form>
<div id="div2" style="visibili ty:hidden">
<table style="border-collapse:collap se;"><!-- if border-collapse is
removed here, div is truely hidden-->
<tr>
<td valign="middle" style="border-top: solid thin Green;"><b><spa n
id="spanID1">12 34</span></b>
</td>
</tr>
</table>
</div>
<div id="div4" style="visibili ty:hidden">
<!-- if border-collapse is removed from table below, div is truely
hidden -->
<table style="border-collapse:collap se; border-bottom: solid thin Red; border-top: solid thin Red;">
<tr>
<td style="border-right: solid thin Blue;">yyyy</td>
</tr>
</table>
</div>
</body>
</html>


Jul 23 '05 #2
Hi,

For anyone who is interested, I just happened to stumble across the
solution (after dealing with this issue another way a while back):

the style attribute for the table tags that were <visibility:hid den>
should have been
<visibility:hid den; display:none;>

Then the 'border-collapse' table attribute works as expected.

Irene

ir********@yaho o.com wrote:
Hi again,

I forgot to mention that I am using IE 6.0.

Would anyone know why the border-collapse table attribute is causing
the hidden div to display some of the borders in the example below?

Thanks,
Irene

ir********@yaho o.com wrote:
Hi,

I have example html below which contains a couple of hidden divs.
However, some of the table borders within these hidden divs are
actually displayed when they should not be.

In my example, I have comments indicating that if I remove the
'border-collapse' attribute for two of the tables within the hidden
divs, my problem is fixed.

However, in my real html page, I need the border-collapse
attribute, or
the tables do not display as I would like them too.
Could anyone explain to me what I am doing wrong and how I can get the
divs to be truely hidden without compromising the table display

when it
is necessary?

(My example does not make sense; it is just stripped down html to

show
the unwanted affect)

Thanks very much for any insight into my problem!!
Irene
p.s. I had nice indents for the display below, but on the page

preview
they were lost... sorry

<html>
<body onload="init(); " >
<script language="javas cript">
function init()
{ window.setTimeo ut( initTest, 1000 );
}
function initTest()
{document.getEl ementById( 'div1' ).innerHTML =
document.getEle mentById('div2' ).innerHTML;
}
</script>

<form name="searchFor m">
<table style="border-collapse:collap se;">
<tr>
<td>
<div id="div3">
<table style="border-collapse: collapse; border-bottom: solid thin
Red; border-top: solid thin Red;">
<tr>
<td style="border-right: solid thin Blue;">xxxx</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<table style="border-collapse:collap se;">
<tr>
<td>
<div id="div1"></div>
</td>
</tr>
</table>
</form>
<div id="div2" style="visibili ty:hidden">
<table style="border-collapse:collap se;"><!-- if border-collapse is
removed here, div is truely hidden-->
<tr>
<td valign="middle" style="border-top: solid thin Green;"><b><spa n
id="spanID1">12 34</span></b>
</td>
</tr>
</table>
</div>
<div id="div4" style="visibili ty:hidden">
<!-- if border-collapse is removed from table below, div is truely
hidden -->
<table style="border-collapse:collap se; border-bottom: solid thin

Red;
border-top: solid thin Red;">
<tr>
<td style="border-right: solid thin Blue;">yyyy</td>
</tr>
</table>
</div>
</body>
</html>


Jul 23 '05 #3

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

Similar topics

2
1627
by: krunkelgarten | last post by:
Hi there, I've developed a site for a group of companies. And they wanted their adresses etc. on the site. The site is http://fmf.centrumweertpromotion.nl/ When you click on the 2nd thing from the left in the menu, and then click 'fashion' you get a view of all the involved companies. To keep it easy to update, i made a folder for every company with their logo and a info.php-file with their address etc. in it. The BIG PROBLEM is that i...
9
2555
by: Robert Misiorowski | last post by:
Hello, I have a very perplexing (at least to me) problem that hopefully someone can help me with. I'm making a site with a 3 column layout. In the middle column (my fluid column) I am trying to put a table of 99% width. When I do this the table actually extends to the right over my right column and off the screen. After much debugging and trying of different things, I change this line in my code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD...
0
1816
by: h | last post by:
Hello everyone I am baffled by the behaviour of a webpage that I am trying to design(when viewed in ie6). I believe the problem arises when I use floats(at least that is the only occasion when I notice it). My page is set up so that I have a content box centered, and a box to create an interior margin(both divs). I also want to have a third box which would float to the right. For some
6
1806
by: WindAndWaves | last post by:
Hi Gurus The page below has a strange error. It seems to be working very well, just when you enter 8 or 9 for day, month or year then you get an error. I really have no idea where that is coming from. Can you help? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD>
7
1674
by: M O J O | last post by:
Hi, I'm developing a asp.net application and ran into a strange css problem. I want all my links to have a dashed underline and when they are hovered, it must change to a solid line. Sounds simple, but it's not working. I've cooked down my output code to show you what I mean. If you run the code below, there's no line under the link, but if you either remove the
20
2055
by: Jim | last post by:
Hi, I am hoping that someone here can help me out. I am for the first time trying to implement a page design using only CSS instead of HTML tables. I've been able to get most of the page done ok. I have my header area and below it 3 columns. My problem is within the header area.
14
1608
by: Gerry Vandermaesen | last post by:
I'm having a problem with IE which displays my page footer partly beneath the viewable/scrollable window. It seems to calculate the bottom margin from the top of the div without looking at it's content. I'm not even using absolute positioning there so I'm not sure what the problem is. Any explanation for this and maybe some clean solution? http://users.skynet.be/fa800152/
4
2156
by: ben.dixon | last post by:
Hi, I'm using links for navigation on a test page, so each link will go to a question in the test e.g. Question 1, Question 2 etc. For each link i am using an Outer Border, Middle border and Inner border, each with their own color depending on the status of the question (e.g. Read, Answered, Viewed etc.) so that the user can distinguish between questions they've answered and one they haven't answered.
1
1242
by: metaperl | last post by:
On reddit.com, many moons ago, I downloaded some code which generated a page using HTML tables from a picture of the page you wanted. However, I dont have any author information in the code and wanted to stay in touch which she/he... does anyone know who wrote this code below? # Box geometry. class Box(object): def __init__(self, x, y, right, bottom):
0
3511
by: sjickells | last post by:
Hi I am having a problem using asp:TextBox's in a transparent table. I have a background image on the page and a table in the middle of the page. I have set the background colour of the table to white the used CSS to set the opacity to 90 so that you can see the background image through the table. The problem I am having is with the textboxes in the transparent
0
9943
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11151
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10750
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10419
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9577
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7974
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5804
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5996
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3237
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.