This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > January 2005 > span not supporting clear: both and using id's
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 |
span not supporting clear: both and using id's
|
|
|
|
| Chris Leipold 2005-01-18, 7:18 am |
| Try using a block element rather than an inline element.
Chris
yawnmoth wrote:
> In IE6, setting clear to both in a span tag seems to work, whereas it
> doesn't seem to work in Firefox. A demonstration can be found here:
>
> http://www.frostjedi.com/terra/dev/test3.html
>
> Any ideas as to why this might be, and what can be done to make
> Firefox's rendition of the page the same as IE6's, without using div?
>
> Also, I tried replacing nested css stuff (ie. #div3 p, #div3 span) with
> their own id's (ie. #p and #span) and am now getting different
> renditions.
>
> Here's the orig page:
> http://www.mezzoblue.com/tests/centered-css/ex4.html
>
> Here's the modified page:
> http://www.frostjedi.com/terra/dev/test.html
> Any ideas as to why there's a difference in rendering? Thanks!
>
| |
| yawnmoth 2005-01-18, 7:20 pm |
|
Chris Leipold wrote:
> Try using a block element rather than an inline element.
that won't work, for my purposes :(
<snip>
| |
| Harlan Messinger 2005-01-18, 7:20 pm |
| yawnmoth wrote:
> Chris Leipold wrote:
>
>
> that won't work, for my purposes :(
>
Yet the clear property only applies to block-level elements, per the
specification.
| |
| Jan Roland Eriksson 2005-01-18, 7:20 pm |
| On Tue, 18 Jan 2005 13:31:33 -0500, Harlan Messinger
<hmessinger.removethis@comcast.net> wrote:
>yawnmoth wrote:
[color=darkred]
[color=darkred]
>Yet the clear property only applies to block-level elements, per the
>specification.
That depends (or should at least).
From CSS1
5.5.26 'clear'
Value: none | left | right | both
Initial: none
-> Applies to: all elements
Inherited: no
Percentage values: N/A
From CSS2.1 (and it was in CSS2 already)
9.5.2 'clear'
Value: none | left | right | both | inherit
Initial: none
-> Applies to: block-level elements
Inherited: no
Percentages: N/A
Media: visual
CSS1 originally defined some rules for how to design future versions of
CSS in a "forward compatible" way that would not jeopardize rendering of
old www designs, based on CSS1, in later browser versions.
Hypothetically the OP may have tried his best to write a completely
legit CSS1 style sheet, only to find that the current crop of "modern"
browsers are not CSS1 compatible in some area where they should have
been.
Also there is an oddity in CSS2.1 as it says that a value for 'clear'
can not be 'inherited' but still it specifies 'inherit' as a correct
'clear' property value.
So if an already computed value for clear can not be inherited, from
where shall the next 'clear: inherit' get its value assignment?
It seems that early CSS1 rules are like laws, they only apply to those
who care about them.
--
Rex
| |
| Sander Tekelenburg 2005-01-18, 11:23 pm |
| In article <cauqu0ti0cn4357cfkrbtu23bs6o6d8buu@4ax.com>,
Jan Roland Eriksson <jrexon@newsguy.com> wrote:
[...]
> From CSS1
>
> 5.5.26 'clear'
> Value: none | left | right | both
> Initial: none
> -> Applies to: all elements
> Inherited: no
> Percentage values: N/A
>
> From CSS2.1 (and it was in CSS2 already)
>
> 9.5.2 'clear'
> Value: none | left | right | both | inherit
> Initial: none
> -> Applies to: block-level elements
> Inherited: no
> Percentages: N/A
> Media: visual
>
> CSS1 originally defined some rules for how to design future versions of
> CSS in a "forward compatible" way that would not jeopardize rendering of
> old www designs, based on CSS1, in later browser versions.
>
> Hypothetically the OP may have tried his best to write a completely
> legit CSS1 style sheet, only to find that the current crop of "modern"
> browsers are not CSS1 compatible in some area where they should have
> been.
This reminds of something that came up in a discussion elsewhere. Let's
say a hypthetical browser is fully CSS 1 and 2 compliant, how should it
decide which CSS spec it should apply to a Style Sheet that fits both
CSS 1.0 and 2.0? As CSS doesn't require a doctype declaration, I get the
impression the expected behaviour is undefined. Correct?
--
Sander Tekelenburg, <http://www.euronet.nl/%7Etekelenb/>
| |
| Jan Roland Eriksson 2005-01-18, 11:23 pm |
| On Wed, 19 Jan 2005 01:48:09 +0100, Sander Tekelenburg
<user@domain.invalid> wrote:
>In article <cauqu0ti0cn4357cfkrbtu23bs6o6d8buu@4ax.com>,
> Jan Roland Eriksson <jrexon@newsguy.com> wrote:
>[...]
[...]
[color=darkred]
>...Let's say a hypthetical browser is fully CSS 1 and 2 compliant,...
It can't be, given today's situation.
>...how should it decide which CSS spec it should apply to a Style Sheet
>that fits both CSS 1.0 and 2.0?
No need for "versioning" if further CSS developments follows the ideas
of how to stay forward compatible. As the CSS specs has developed at the
outside of original ideas, the case is lost and CSS1 has been rendered
"useless".
Given a correct case of developments, CSS1 should have been a 100% legit
subset of CSS2.x. That did not happen sad to say.
>As CSS doesn't require a doctype declaration,...
There is absolutely nothing in a doctype declaration that specifies a
"version" of (X)HTML to be parsed either, don't fall into that trap.
For your, and anyone's trivial exercise, cut and paste any or all of
these following pieces of markup into the validating form at...
<http://www.htmlhelp.org/tools/validator/direct.html>
=====
<!DOCTYPE head PUBLIC "-//W3C//DTD HTML 4.01//EN">
<head>
<title>Abracadabra</title>
</head>
=====
<!DOCTYPE body PUBLIC "-//W3C//DTD HTML 4.01//EN">
<body>
<p>Hello World, wake up!</p>
</body>
=====
<!DOCTYPE div PUBLIC "-//W3C//DTD HTML 4.01//EN">
<div>
<p>Mystery stuff this DOCTYPE thingy.</p>
</div>
=====
<!DOCTYPE span SYSTEM "http://www.w3.org/TR/html4/strict.dtd">
<span>Have you solved the DOCTYPE mystery yet?</span>
=====
Variations are almost endless, but version info is not an issue here.
Why not a final one...
<!DOCTYPE head SYSTEM "http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>Abracadabra</title>
</head>
<body>
<p>Oh, shit!</p>
</body>
--
Rex
| |
| Harlan Messinger 2005-01-20, 7:22 pm |
| yawnmoth wrote:
> Chris Leipold wrote:
>
>
> that won't work, for my purposes :(
>
Yet the clear property only applies to block-level elements, per the
specification.
| |
| Chris Leipold 2005-01-20, 7:23 pm |
| Try using a block element rather than an inline element.
Chris
yawnmoth wrote:
> In IE6, setting clear to both in a span tag seems to work, whereas it
> doesn't seem to work in Firefox. A demonstration can be found here:
>
> http://www.frostjedi.com/terra/dev/test3.html
>
> Any ideas as to why this might be, and what can be done to make
> Firefox's rendition of the page the same as IE6's, without using div?
>
> Also, I tried replacing nested css stuff (ie. #div3 p, #div3 span) with
> their own id's (ie. #p and #span) and am now getting different
> renditions.
>
> Here's the orig page:
> http://www.mezzoblue.com/tests/centered-css/ex4.html
>
> Here's the modified page:
> http://www.frostjedi.com/terra/dev/test.html
> Any ideas as to why there's a difference in rendering? Thanks!
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|