Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inherit border color ??

Status
Not open for further replies.

vego

Programmer
Jun 26, 2004
47
US
Hi, I'm just wondering if one can set the color of... let's say a th, so that depending on the user's system/browser, the default color would show. What I mean is, if you were to just indicate a border for a table like this:

<table border=1>

...you would end up with a certain color, depending on the system. Can something be done like this using CSS?

th {border-left: 1px solid inherit}

or am I nutzzz!
 
...actually, I meant <table border>
sorry...
 
You could detect the browser via JavaScript, and include the proper CSS file based on which value is returned:

Code:
<script language='javascript'>
var whichBrowser = navigator.appName;
if (whichBrowser != "Microsoft Internet Explorer") {
     document.write('<!--#include virtual="/includes/nonIECSS.ins"-->');
} else {
     document.write('<!--#include virtual="/includes/IECSS.inc"-->');
}
</script>

tigerjade :)

"Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live." -- Martin Golding


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top