PDA

View Full Version : border issue



Shadowfox
Aug 13th, 2007, 08:50 PM
Greetings, everybody!
To cut the long story short, I provide you the following code.
If you would run it under Internet Explorer and Mozilla Firefox you shall notice a difference in the way it is rendered. Could you please help me solve this issue?
Thank you!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/xhtml1-strict.dtd">
<html>
<head>
<title></title>
<style type="text/css">
* {
margin: 0px;
padding: 0px;
}
body {
margin: 5px;
}
</style>
</head>

<body>

<div style="border: 1px solid #ff0000;">
<table style="border: 1px solid #00ff00; border-collapse:collapse;">
<tr>
<td>bla</td>
</tr>
</table>
</div>

</body>

</html>

effpeetee
Aug 13th, 2007, 09:10 PM
I cannot see any difference between the two.

Frank

Shadowfox
Aug 13th, 2007, 09:27 PM
The following image should bring clarification on the subject.

_Aerospace_Eng_
Aug 13th, 2007, 09:33 PM
I see the issue but with your current setup thats how its going to be. Firefox is correct. IE is not. border-collapse is supposed to combine all borders into a single border which is why the green one overlaps the red one.

This would be one solution

<div style="border: 1px solid #ff0000;">
<table style="border: 1px solid #00ff00;" cellpadding="0" cellspacing="0">
<tr>
<td>bla</td>
</tr>
</table>
</div>
But then I have to ask why are you using tables to begin with? Will you be displaying data?

Shadowfox
Aug 13th, 2007, 09:46 PM
Data is indeed the intended content for these tables.