Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-13-2011, 03:01 PM   PM User | #1
Blackeye
New to the CF scene

 
Join Date: Sep 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Blackeye is an unknown quantity at this point
Internet Explorer border-top, border-bottom in IE won't work

Hej!

I've got a little problem with some border styling. I want a border-bottom and a border-top on a table row. In IE 6, IE 7 and IE 8 there is no border. It works in all other browsers.

Here is my css:
Code:
.switchcontentZi {
	border-top: 1px solid black !important;
        border-bottom: 1px solid black !important;
}
And here is my HTML-Construct:
Code:
<table class="medium" width="720">
     <tr id="room1" class="switchcontentZi" style="display: block;">
     <tr id="room2" class="switchcontentZi" style="display: block;">
     <tr id="room3" class="switchcontentZi" style="display: block;">
     <tr id="room4" class="switchcontentZi" style="display: block;">
     <tr id="room5" class="switchcontentZi" style="display: block;">
</table>
I've already searched in this forum and via google and found some hints that the "display: block" could be the problem. But I couldn't solve this problem.

Can someone help me and fix this problem?

Blackeye

Last edited by Blackeye; 09-14-2011 at 07:24 AM.. Reason: Resolved
Blackeye is offline   Reply With Quote
Old 09-13-2011, 03:04 PM   PM User | #2
Rowsdower!
Senior Coder

 
Rowsdower!'s Avatar
 
Join Date: Oct 2008
Location: Some say it's everything.
Posts: 2,007
Thanks: 5
Thanked 395 Times in 388 Posts
Rowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura about
It generally works best to put the border onto the td and/or th elements in the row. You can achieve that with your existing CSS with only a minor tweak:

Code:
.switchcontentZi td, .switchcontentZi th{
	border-top: 1px solid black !important;
	border-bottom: 1px solid black !important;
}
With that said, you aren't showing us any td or th elements in those rows... they are there, aren't they?
__________________
The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
See Mediocrity in its Infancy
It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
Seek and you shall find... basically:
validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting
Rowsdower! is offline   Reply With Quote
Users who have thanked Rowsdower! for this post:
Blackeye (09-14-2011)
Old 09-13-2011, 03:09 PM   PM User | #3
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,602
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Yeah, don’t style table rows, style the cells in these rows. Table rows have proven inconsistent in different browsers when it comes to CSS.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 09-14-2011, 07:22 AM   PM User | #4
Blackeye
New to the CF scene

 
Join Date: Sep 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Blackeye is an unknown quantity at this point
You are my heroes! Thank you very much for this hint!

Now it works perfect in all browsers!
Blackeye is offline   Reply With Quote
Reply

Bookmarks

Tags
border, css, display, iexplorer, table

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:20 PM.


Advertisement
Log in to turn off these ads.