By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,739 Members | 1,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,739 IT Pros & Developers. It's quick & easy.

html table rules=all, css border:none Mozilla1.6- incl draws stillnasty interiour border

P: n/a
When using <TABLE rules="all"> Mozilla 1.6 and previous versions
draw a nasty interiour border, which doesnt go away though I have
on TD's css border:none set.

Is it something wrong with my stylehseet or is it a bug of mozilla?
I am asking this because of IE and Opera work differently here.

<style>
table.calendar{
width:492px;
margin-bottom:10px;
border:none;
font:10px Verdana;
background:#cddefc;
}

table.calendar tbody th{
padding:3px 0px;
vertical-align:middle;
border:none;
color:#5d71a5;
font-weight:normal;
}
table.calendar tbody td{
padding:2px 5px 2px 5px;
vertical-align:middle;
text-align:right;
border:none;
border-top:1px solid white;
color:#000;
}

</style>

<table class="calendar" border="1" cellspacing="0" cellpadding="5"
frame="void" rules="all">
<thead>
<tr>
<td><a href="handleform?go=prev_month">&laquo;</a></td>
<td colspan="5"> jaanuar 2004 </td>
<td><a href="handleform?go=next_month">&raquo;</a></td>
</tr>
</thead>
<tbody>
<tr><!-- esimene nädal -->
<td></td>
<td></td>
<td></td>
<td><a href="handleform?go=1">1</a></td>
<td><a href="handleform?go=1">2</a></td>
<td><a href="handleform?go=1">3</a></td>
<td><a href="handleform?go=1">4</a></td>
</tr>
<tbody>
</table>
Jul 20 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
On Tue, 03 Feb 2004 02:40:07 +0200, Marek Mänd <ca********@mail.ee>
wrote:
When using <TABLE rules="all"> Mozilla 1.6 and previous versions
draw a nasty interiour border, which doesnt go away though I have
on TD's css border:none set.

Is it something wrong with my stylehseet or is it a bug of mozilla?
I am asking this because of IE and Opera work differently here.


If you try to define presentation using both HTML and CSS, the result is
undefined, and so likely to vary from browser to browser. Ditch the
rules attribute and stick to CSS.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #2

P: n/a
Stephen Poley wrote:
On Tue, 03 Feb 2004 02:40:07 +0200, Marek Mänd <ca********@mail.ee>
wrote:

When using <TABLE rules="all"> Mozilla 1.6 and previous versions
draw a nasty interiour border, which doesnt go away though I have
on TD's css border:none set.

Is it something wrong with my stylehseet or is it a bug of mozilla?
I am asking this because of IE and Opera work differently here.

If you try to define presentation using both HTML and CSS, the result is
undefined, and so likely to vary from browser to browser. Ditch the
rules attribute and stick to CSS.


No, the result is not undefined. frame and rules are valid table
attributes. It's just that some browsers have never handled them correctly.
Matthias

Jul 20 '05 #3

P: n/a
DU
Marek Mänd wrote:
When using <TABLE rules="all"> Mozilla 1.6 and previous versions
draw a nasty interiour border, which doesnt go away though I have
on TD's css border:none set.

Is it something wrong with my stylehseet or is it a bug of mozilla?
I am asking this because of IE and Opera work differently here.

<style>
<style type="text/css"> is needed to avoid a validation error.
table.calendar{
width:492px;
margin-bottom:10px;
border:none;
FWIW, I think it should be
border:0px none;
because none applies to border-style.
font:10px Verdana;
background:#cddefc;
}

table.calendar tbody th{
padding:3px 0px;
vertical-align:middle;
border:none;
color:#5d71a5;
font-weight:normal;
}
table.calendar tbody td{
padding:2px 5px 2px 5px;
vertical-align:middle;
text-align:right;
border:none;
border-top:1px solid white;
color:#000;
}

</style>

<table class="calendar" border="1" cellspacing="0" cellpadding="5"
frame="void" rules="all">
<thead>
<tr>
<td><a href="handleform?go=prev_month">&laquo;</a></td>
<td colspan="5"> jaanuar 2004 </td>
<td><a href="handleform?go=next_month">&raquo;</a></td>
</tr>
</thead>
<tbody>
<tr><!-- esimene nädal -->
<td></td>
<td></td>
<td></td>
<td><a href="handleform?go=1">1</a></td>
<td><a href="handleform?go=1">2</a></td>
<td><a href="handleform?go=1">3</a></td>
<td><a href="handleform?go=1">4</a></td>
</tr>
<tbody>
</table>

Your code is contradictory and incoherent.
- You set border:none everywhere for table-cell and rules="all".
- You define border="1" and frame="void". If you don't want a table
frame, then why do you define a border for such frame?
- There is no <th> in your <tbody>: so why do you create a css rule for it?
- Vertical-align:middle is the default css declaration for table cells;
so there is no need to declare it.
- You define a cellpadding="5" and then redefine a padding for specific
cells: all this can only make the parsing and rendering longer, more
complex and subject to bugs.
You should either just use CSS properties or just define table
attributes when there is an opposition. Best is to use only CSS
properties since these are formating attributes.
Just eliminate sources of contradictions and confusion in your code by
restricting to css properties when their equivalent table attributes are
formating ones.

DU

Jul 20 '05 #4

P: n/a
Stephen Poley wrote:
On Tue, 03 Feb 2004 02:40:07 +0200, Marek Mänd <ca********@mail.ee>
wrote:
When using <TABLE rules="all"> Mozilla 1.6 and previous versions
draw a nasty interior border, which doesn't go away though I have
on TD's css border:none set.
Can't help wondering why people do such things? Make sure the
"border-collapse" property is set for the table as well as "border"
for the cell.
Is it something wrong with my stylesheet or is it a bug of mozilla?
I am asking this because of IE and Opera work differently here.
If you try to define presentation using both HTML and CSS, the result is
undefined, and so likely to vary from browser to browser.


Would be nice if it were so, it would be a good argument to use. The
browser is supposed to convert HTML attributes to their equivalent CSS
rules and add them to the cascade with the lowest level of precedence,
thus an author's <FONT color="blue"> loses to a user styleheet with
font {color: black} even if the user stylesheet doesn't include
!important. (IIRC)

Of course it's up the browser makers what they consider the equivalent
of any particular attribute specification to be. What to make of
rubbish like <TABLE rules="all"> is anyone's guess. (Vague
recollection turns to wild speculation here) Mine would be:
TABLE {border-collapse: collapse} TD, TH {border: thin solid}
To undo the damage you'd need to reset the border-collapse to
"seperate", "separate" "apart" "no" or whatever it is???
Ditch the rules attribute and stick to CSS.


You still have the knack for a concise turn of phrase, I see.

--
Heard on television:
"kilommittees"
(trying to say "kilometres" while apparently thinking "committee")
Jul 20 '05 #5

P: n/a
DU <dr*******@hotWIPETHISmail.com> writes:
border:none;


FWIW, I think it should be
border:0px none;
because none applies to border-style.


FWIW, section 8.5.3 (border-style) of CSS 2 states:

| none
| No border. This value forces the computed value of 'border-width' to be '0'.

I vaguely recall problems with Konqueror 2 though when a border is set
for a simple selector and overridden by a class with 'border: none;'
without declaring an explicit width of zero as well.
--
| ) 111010111011 | http://bednarz.nl/
-(
| ) Distribute me: http://binaries.bednarz.nl/mp3/aisha
Jul 20 '05 #6

P: n/a
On Tue, 03 Feb 2004 10:46:13 +0100, Matthias Gutfeldt wrote:
Stephen Poley wrote:
On Tue, 03 Feb 2004 02:40:07 +0200, Marek Mänd <ca********@mail.ee>
wrote:
When using <TABLE rules="all"> Mozilla 1.6 and previous versions
draw a nasty interiour border, which doesnt go away though I have
on TD's css border:none set.

Is it something wrong with my stylehseet or is it a bug of mozilla?
I am asking this because of IE and Opera work differently here.
If you try to define presentation using both HTML and CSS, the result is
undefined, and so likely to vary from browser to browser. Ditch the
rules attribute and stick to CSS.
No, the result is not undefined. frame and rules are valid table
attributes. It's just that some browsers have never handled them correctly.


Well OK, I suppose one could quibble about the word "undefined". What
the definition actually says is:

"6.4.4 Precedence of non-CSS presentational hints

"The UA may choose to honor presentational hints from other sources than
style sheets, for example the FONT element or the "align" attribute in
HTML."

Note the "may". It seems to me that this means the result is undefined
for all practical purposes.

I'll accept that in this particular case, if reported correctly, the
behaviour of Mozilla looks doubtful, as it appears to be honouring the
HTML and not the CSS. But whether an attribute on the TABLE element
truly corresponds to a TD rule seems to me the sort of pointless
argument that could keep lawyers (and even c.i.w.a.* regulars) going for
a while.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #7

P: n/a
DU
Stephen Poley wrote:
On Tue, 03 Feb 2004 10:46:13 +0100, Matthias Gutfeldt wrote:

Stephen Poley wrote:
On Tue, 03 Feb 2004 02:40:07 +0200, Marek Mänd <ca********@mail.ee>
wrote:
When using <TABLE rules="all"> Mozilla 1.6 and previous versions
draw a nasty interiour border, which doesnt go away though I have
on TD's css border:none set.

Is it something wrong with my stylehseet or is it a bug of mozilla?
I am asking this because of IE and Opera work differently here.
If you try to define presentation using both HTML and CSS, the result is
undefined, and so likely to vary from browser to browser. Ditch the
rules attribute and stick to CSS.


No, the result is not undefined. frame and rules are valid table
attributes. It's just that some browsers have never handled them correctly.

Well OK, I suppose one could quibble about the word "undefined". What
the definition actually says is:

"6.4.4 Precedence of non-CSS presentational hints

"The UA may choose to honor presentational hints from other sources than
style sheets, for example the FONT element or the "align" attribute in
HTML."

Note the "may". It seems to me that this means the result is undefined
for all practical purposes.

I'll accept that in this particular case, if reported correctly, the
behaviour of Mozilla looks doubtful, as it appears to be honouring the
HTML and not the CSS. But whether an attribute on the TABLE element
truly corresponds to a TD rule seems to me the sort of pointless
argument that could keep lawyers (and even c.i.w.a.* regulars) going for
a while.


All of this can be very easily avoided: just put coherence and
complementarity into the css declarations and the html attributes. Best
is to only use css properties when styling and/or formating are involved.

DU
Jul 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.