Forum Moderators: not2easy

Message Too Old, No Replies

Firefox doesn't support "%" on border? :o

"px" does work

         

mupo

10:32 am on Apr 12, 2005 (gmt 0)

10+ Year Member



Is it true, that Firefox doesn't support "%" on borders? Opera does ist right.
IE also doesn't support it, but i didn't expect that from firefox. :o

Replacing "%" with "px" does work.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><title>Test</title></head>
<body>
<div style="border: 20% solid black">TEST</div>
</body>
</html>

Longhaired Genius

11:05 am on Apr 12, 2005 (gmt 0)

10+ Year Member



Opera does it wrong. Percentage width is not valid for CSS borders [w3.org]. Width should be either a value (thin, medium, thick) or a length (px, em, ex).

mupo

12:23 pm on Apr 12, 2005 (gmt 0)

10+ Year Member



Oh well,
i found that it is also a discussion point for css3 [w3.org]:

"[Border-width doesn't allow percentages in CSS2; should we allow percentages (of the containing block's width) in CSS3?]"

i hope they allow it, why not?