Solved

CSS Inheritance and getting rid of inherited style

Posted on 2007-11-27
4
601 Views
Last Modified: 2012-06-21
Hi All,

I need a little help with browser capability.  The change I did works in Mozilla but not in IE....

Maybe I am doing it wrong?

My Style created
--------------------
table.styled_table tr.AdCodeHeader {
border-top:0px none transparent;
font-weight:normal;
margin:0px;
padding:0px;
}

Style that is being inherited from a previous tag
-----------------------------------
table.styled_table tr {
border-top:1px solid #BBBBBB;
}

where I am trying to overwrite proeviously inherited style
-------------------------------------------------------------------
table cellpadding="0" cellspacing="0" border="0">
<tr class="AdCodeHeader">

Results
---------
Mozilla *stops* producing the border line
Ie *continues* to produce the border line.

Any help with this issue is greatly appreciated...

Thanks,

Angela
0
Comment
Question by:angelalaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 13

Expert Comment

by:R7AF
ID: 20358135
border-top:0px none transparent;

Can't test now, but is this valid? I would leave the "none" out.
0
 

Author Comment

by:angelalaw
ID: 20358347
Hi,

Thanks for replying.... Yep that is size, border type, and color....

http://www.w3schools.com/css/pr_border-style.asp

says none is valid for that...

Any other ideas?

Angela
0
 
LVL 13

Accepted Solution

by:
R7AF earned 500 total points
ID: 20358486
This works in both IE and FF.
<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    	<title>Test</title>
    	<style type="text/css">
    		table.styled_table tr td {
    		border-top:1px solid #BBBBBB;
    		font-weight: bold;
    		}
    		
    		table.styled_table tr.AdCodeHeader td {
    		border-top:0px none transparent;    		
    		}
    	</style>
    </head>
	<body>
		<table class="styled_table">
			<tr>
				<td>Head</td>
			</tr>
			<tr>
				<td>Test</td>
			</tr>
		</table>
		<table class="styled_table">
			<tr class="AdCodeHeader">
    			<td>Head</td>
    		</tr>
			<tr>
				<td>Test</td>
			</tr>
    	</table>
    </body>
</html>

Open in new window

0
 

Author Closing Comment

by:angelalaw
ID: 31411197
thanks so much, I struggled with this for a day and a half!

Marked Partially and A because it doesn't keep all the original functionality

The only problem with this solution is if you use cellpadding and cellspacing the line that the top border creates will break up instead of being one consistant line all they way through the table...
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question