This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > June 2004 > Diagnostic CSS snippet





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Diagnostic CSS snippet
KiwiBrian

2004-06-23, 4:15 am

I have a snippet of a few CSS rules that I insert in a page as a diagnostic
tool
It places borders around specified tags.
However I have been unable to get it to display borders on table rows.
Is there any way of doing this.
Has anyone got a favorite diagnostic snippet?

Here is the snippet, which I activate by removing the leading /

/*
* {
border: 1px solid red;
}
table {
border: 3px solid green;
}
*/

Brian Tozer


Neal

2004-06-23, 4:15 am

On Wed, 23 Jun 2004 15:38:32 +1200, KiwiBrian <briantoz@ihug.co.nz> wrote:

> I have a snippet of a few CSS rules that I insert in a page as a
> diagnostic
> tool
> It places borders around specified tags.
> However I have been unable to get it to display borders on table rows.
> Is there any way of doing this.


Er... tr {border:1px red dotted}?
KiwiBrian

2004-06-23, 4:15 am


"Neal" wrote
> KiwiBrian wrote:


[color=darkred]
> Er... tr {border:1px red dotted}?


Not in IE6 in XP Pro in a PC.
Just tried the following, with narry a row border in sight.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
<TITLE>Test</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
div.centered {text-align: center;}
div.centered table {margin: 0 auto; text-align: left;}
tr {
border: 25px blue dotted;
padding: 25px;
margin: 25px;
}
td {
border:25px red solid;
padding: 25px;
margin: 25px;
}
table {
border: 25px green solid;
padding: 25px;
margin: 25px;
}
-->
</style>
</head>
<body>
<div class="centered">
<table>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
</tr>
</table>
</div>
</body>
</html>

Brian Tozer


Neal

2004-06-23, 4:15 am

On Wed, 23 Jun 2004 16:28:43 +1200, KiwiBrian <briantoz@ihug.co.nz> wrote:

>
> "Neal" wrote
>
>
>
> Not in IE6 in XP Pro in a PC.
> Just tried the following, with narry a row border in sight.


Perhaps it is overlaooed by the other borders. Try just the tr rule, with
no others.
Phil Evans

2004-06-23, 7:15 am

KiwiBrian wrote:
> Has anyone got a favorite diagnostic snippet?


Not as such, but Firefox's Developer Toolbar allows you to outline
arbitrary elements, all block level elements, tables, or whatever . . .

Couldn't live without it now

P
Wolfgang Wildeblood

2004-06-23, 12:19 pm

"KiwiBrian" <briantoz@ihug.co.nz> wrote:

> I have a snippet of a few CSS rules that I insert in a page as a diagnostic
> tool
> It places borders around specified tags.
> However I have been unable to get it to display borders on table rows.
> Is there any way of doing this.


Add "border-collapse: collapse;" - TR doesn't take borders when
border-collapse is "separate", "apart" or whatever the default is
called.


> Has anyone got a favorite diagnostic snippet?


h1, h2, h3, h4, h5, h6 {
text-decoration: blink
}
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
text-decoration: none
}

--
"You have to reverse the polarity, of course."
brauneberger

2004-06-25, 7:15 am

> Has anyone got a favorite diagnostic snippet?

Yes. The Web Developers Toolbar by Chris Pederick.
http://www.chrispederick.com/work/firefox/webdeveloper/
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews