"Display: block" on a-elements

VERIFIED INVALID

Status

()

Core
HTML: Parser
P3
enhancement
VERIFIED INVALID
18 years ago
17 years ago

People

(Reporter: eof, Assigned: harishd)

Tracking

({verifyme})

Trunk
x86
Windows 2000
verifyme
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
I wanted to make a colored box with a header and some text to be a link in
itself, but mozilla refuses to render something within <a></a> as a block (while
IE5.5 does render it as a block regardless of whether I specifically state that
in the style-sheet or not).
(Reporter)

Comment 1

18 years ago
(hrm, still haven't tamed this bugzilla...)

To reproduce it, make a html-file with
<a><h1>Head1</h1><p>text!</p></a>
<a><h1>Head2</h2><p>test!</p></a>
  and a stylesheet (css2) with
a {
 display: block;
 width: 40%;
 float: left;
 background-color: red;
}

..and you should see the problem.  If not, change the a to div and compare!
This is probably a parser issue - the HTML is invalid and the parser may be
doing something to correct it.  What was the DOCTYPE on the page?
(Reporter)

Comment 3

18 years ago
My test/case was with strict xhtml 1.0 (<!DOCTYPE html PUBLIC "-//W3C//DTD 
XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">) and 
pure xml with <?XML:stylesheet type="text/css" href="testing.css"?>.
  I see how this conflicts with the html-specifications, but CSS2 just says (in 
the end of 9.2.5) that "Conforming HTML user agents may ignore the 'display' 
property", not that it's illegal to change the display-type of things defined 
in html.

Comment 4

17 years ago
Reassigned to Harish/Parser, but I think we tend to immediately close as Invalid 
any bug reported against the display of a document that has a strict DTD and an 
invalid HTML.
Assignee: pierre → harishd
Component: Style System → Parser
CSS requires a valid document tree (content model) to operate on. Your document
is not valid.

Hence -> INVALID.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → INVALID

Comment 6

17 years ago
Adding 'verifyme' keyword
Keywords: verifyme

Comment 7

17 years ago
Verified invalid
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.