473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

span not supporting clear: both and using id's

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!

Jul 21 '05 #1
6 6315
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!

Jul 21 '05 #2

Chris Leipold wrote:
Try using a block element rather than an inline element.

that won't work, for my purposes :(

<snip>

Jul 21 '05 #3
yawnmoth wrote:
Chris Leipold wrote:
Try using a block element rather than an inline element.


that won't work, for my purposes :(


Yet the clear property only applies to block-level elements, per the
specification.
Jul 21 '05 #4
On Tue, 18 Jan 2005 13:31:33 -0500, Harlan Messinger
<hm*******************@comcast.net> wrote:
yawnmoth wrote:
Chris Leipold wrote:
Try using a block element rather than an inline element.
that won't work, for my purposes :(

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
Jul 21 '05 #5
In article <ca********************************@4ax.com>,
Jan Roland Eriksson <jr****@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/>
Jul 21 '05 #6
On Wed, 19 Jan 2005 01:48:09 +0100, Sander Tekelenburg
<us**@domain.invalid> wrote:
In article <ca********************************@4ax.com>,
Jan Roland Eriksson <jr****@newsguy.com> wrote:
[...]
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.

[...]
...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
Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Carl | last post by:
When using 'name' in the form, it works, when using 'id' it doesn't. Any comments about this? By the way, is this a good method or is it better to use 'getElementById'? Carl <body> <form...
5
by: toufik toufik | last post by:
Hi, I've an html page that contains a form, inside the form Ive the folowing input <input name="myName" id="myId" size="40" > I know how to access to it in javascript using its name...
4
by: Florian Brucker | last post by:
Hi! I've got a problem with float & clear. Take this example code: <div style=" width:100px; height:100px; background-color:#FF0000; float:left; margin:10px;"></div> <span...
1
by: venkatesh | last post by:
Hi, I am trying to use id-utils to browse a C++ source code (with .cpp extensions for the filenames). The problem I face is that mkid (which creates the ID database) doesn't parse the .cpp...
5
by: Rick | last post by:
Hello, I posted a question regarding data validation earlier and it worked great! I have a new question. Is there anyway to cut through all the if statements and just have a for loop that uses...
1
by: ksenthilece | last post by:
I needed to get each values of a particular cell ..i.e cell value is integer and add each value of the column and display it in the footer..can anyone suggest
1
by: chris123 | last post by:
<asp:SqlDataSource runat="server" ID="MySource" ConnectionString="SERVER=(local); DATABASE=northwind;Integrated Security=SSPI;" SelectCommand="SELECT * FROM employees WHERE employeeid >...
0
by: gauravkec2005 | last post by:
how can i access an object using its id for eg. string='hi' idval=id(string) Now by using idval can i access the string variable
2
by: cloftis | last post by:
Using VS2003, VB and MSHTML, Using an HTMLSpanElement I want to enumerate the attributes of a SPAN tag. 1 'For testing sake 2 Dim strMarkup as String = "<span attr1='somevalue'...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.