473,324 Members | 2,196 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,324 software developers and data experts.

Float Problems in Certain Browsers -- Help!

HI everyone, lurking for a long time here, since I can usually solve my own
problems, but here is one I'm stumped by.

I've got a valid XHTML 1.0 Transitional layout, and all the CSS is valid as
well (plenty of warnings, but I'm not worried about that), and I'm making
use of the float property without any problems EXCEPT for one page (coloured
backgrounds added for clarity):

http://autographquartet.com/contact.php

I've set up a publicly viewable page on BrowserCam.com to show the problem
as it manifests itself in a few browsers:

http://www.browsercam.com/public.aspx?proj_id=11969

The problem browsers are IE 5.x for Mac (OS 9 or OS X), Safari 1.0, and
Opera 6. The rest seem to display the page without problems.

Since I was under the impression that IE for the PC (even v6) has major
float issues, I was quite surprised to see that it renders the page exactly
as intended, while IE 5/Mac (usually a very solid browser when it comes to
CSS) falls on its face.

I can see that the problem is somehow related to the floated sidebar on the
right, since in the affected browsers the "pink" area of the form is pushed
down exactly to the bottom of the sidebar element, but I've checked the
source and the CSS over and over and have not found anything to be out of
place.

If there are any solutions (I'll take hacks, though something non-hack-like
is preferable) I'd love to hear them, since I've now spent the best part of
36 hours trying to figure it out on my own, to no avail.

Thanks for any advice!

Cheers,

Dan
--
dan rubin

webgraph: branding | usability | design
<http://www.webgraph.com/>
Jul 20 '05 #1
11 2760
Dan Rubin:
HI everyone, lurking for a long time here, since I can usually solve my
own problems, but here is one I'm stumped by.

I've got a valid XHTML 1.0 Transitional layout
[...]
http://autographquartet.com/contact.php


You have this in your code:

<h2><a name="comments"></a>Comments</h2>

In XHTML we're supposed to use "id" for such anchors:

<h2><a id="comments"></a>Comments</h2>

For backwards compatibility it is however best to use "name" as well:

<h2><a id="comments" name="comments"></a>Comments</h2>

But it's better to have some content in the anchor:

<h2><a id="comments" name="comments">Comments</a></h2>

That's the best way to write it.

But watch out for style rules with "hover" for "a" elements. Mozilla will -
rightly so - apply them to such anchors as well, if you don't write the
rules like this: "a:link:hover { ... }".

Not related to your question, I know, but perhaps good to know anyway.

--
Bertil Wennergren <be******@gmx.net> <http://www.bertilow.com>
Jul 20 '05 #2
In article <be*************@news.t-online.com>,
Bertilo Wennergren <be******@gmx.net> wrote:
<h2><a id="comments" name="comments">Comments</a></h2>

That's the best way to write it.

But watch out for style rules with "hover" for "a" elements. Mozilla will -
rightly so - apply them to such anchors as well, if you don't write the
rules like this: "a:link:hover { ... }".


I sometimes use a little bit of CSS-3 magic to make up. But I suppose I
can do things simpler. This line for instance, is valid CSS-3 but the
validator at w3 is limited to CSS-2 and will start a panic.

a:not([href]) { color: inherit; background: inherit; }

--
Kris
kr*******@xs4all.netherlands (nl)
"We called him Tortoise because he taught us" said the Mock Turtle.
Jul 20 '05 #3
Headless:
Bertilo Wennergren <be******@gmx.net> wrote:
You have this in your code:
<h2><a name="comments"></a>Comments</h2>
In XHTML we're supposed to use "id" for such anchors:
<h2><a id="comments"></a>Comments</h2>

<h2 id="comments">Comments</h2>


That however means leaving NS4 behind. It does not understand anchors
written like that. I myself have done that on my site, but many would not
be comfortable with links to such anchors not working in all browsers.

That's why I concluded with a version using "a" elements with both "name"
and "id", the way the XHTML recommendations suggests for backwards
compatibility.

--
Bertil Wennergren <be******@gmx.net> <http://www.bertilow.com>
Jul 20 '05 #4
Bertilo Wennergren <be******@gmx.net> wrote:
<h2 id="comments">Comments</h2>
That however means leaving NS4 behind. It does not understand anchors
written like that.


The fragment bit doesn't work in NS4, but the main part of the link
works. That's good enough for me to classify as graceful degradation.
That's why I concluded with a version using "a" elements with both "name"
and "id", the way the XHTML recommendations suggests for backwards
compatibility.


Only valid in XHTML 1.0, "name" is invalid in XHTML 1.1 IIRC.
Headless

Jul 20 '05 #5
Headless wrote:
Only valid in XHTML 1.0, "name" is invalid in XHTML 1.1 IIRC.


Right, but you don't write XHTML 1.1 which (properly done) doesn't work
in WinIE, do you?
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

Jul 20 '05 #6
Johannes Koch <ko**@w3development.de> wrote:
Only valid in XHTML 1.0, "name" is invalid in XHTML 1.1 IIRC.


Right, but you don't write XHTML 1.1 which (properly done) doesn't work
in WinIE, do you?


I do (next to a 1.0 version served as text/html).

Bertilo wrote " XHTML recommendations", I thought it proper to point out
that this doesn't apply to all versions of XHTML.
Headless

Jul 20 '05 #7
On Mon, Jul 14, Headless inscribed on the eternal scroll:
That's why I concluded with a version using "a" elements with both "name"
and "id", the way the XHTML recommendations suggests for backwards
compatibility.
Only valid in XHTML 1.0,


Yes, but only XHTML 1.0 is compatible with the crop of browsers that
are out there.
"name" is invalid in XHTML 1.1 IIRC.


If you serve it out as text/html, then it's disqualified from being
XHTML 1.1 anyway.

XHTML 1.1 may be a fine idea in its native habitat, but I don't think
the present WWW readership is ready for it yet.

The claimed purpose of 1.0 was to maintain an acceptable degree of
compatibility with HTML. My own somewhat jaded response is that
HTML/4.01 still works just fine, indeed it works incrementally better
than XHTML/1.0, and frankly I'm worried that XHTML/1,0 is serving as
the thin end of the wedge to turn XHTML from formal requirements into
just another flavour of tag soup; so if I haven't got some very strong
reason for using XHTML/1.0 rather than HTML/4.01, I don't really see
the point. Recall that XHTML/1.0 can be transformed by rote into
HTML/4.01, so even the claimed benefits of using XML-based generation
tools don't _really_ make it inevitable that one serves-out XHTML.

I think I _do_ see the point of 1.1, but it sure breaks compatibility
in quite a number of ways, so I wouldn't get too worked-up over this
particular detail. If you are confident that your readership can cope
with real live XHTML/1.1 (maybe because they're also expected to grok
SVG and MathML and so on) then go for it, but I'm sceptical of the
general WWW being ready for that.

IMHO and YMMV, natch.
Jul 20 '05 #8
On 7/14/03 10:48 AM, in article 39********************************@4ax.com,
"Headless" <in*************@dna.ie> wrote:
Bertilo Wennergren <be******@gmx.net> wrote:
<h2 id="comments">Comments</h2>


That however means leaving NS4 behind. It does not understand anchors
written like that.


The fragment bit doesn't work in NS4, but the main part of the link
works. That's good enough for me to classify as graceful degradation.
That's why I concluded with a version using "a" elements with both "name"
and "id", the way the XHTML recommendations suggests for backwards
compatibility.


Only valid in XHTML 1.0, "name" is invalid in XHTML 1.1 IIRC.

The education on properly formed anchors has been terrific, and I'll recode
the site (and others) accordingly -- thanks :-)

Does anyone have even some wild suggestions on how I can fix the float
problem though?

Cheers,

Dan
--
dan rubin

webgraph: branding | usability | design
<http://www.webgraph.com/>
Jul 20 '05 #9
"Alan J. Flavell" <fl*****@mail.cern.ch> wrote:
Only valid in XHTML 1.0,


Yes, but only XHTML 1.0 is compatible with the crop of browsers that
are out there.


Different discussion altogether. Id's are a much cleaner and appropriate
method than those silly <a name="foo"></a> constructs and should be
adopted now irrespective of document type imo.
Headless

Jul 20 '05 #10
On Mon, Jul 14, Headless inscribed on the eternal scroll:
"Alan J. Flavell" <fl*****@mail.cern.ch> wrote:
Only valid in XHTML 1.0,
Yes, but only XHTML 1.0 is compatible with the crop of browsers that
are out there.


Different discussion altogether.


In theory I agree with you, but practical issues also arise...
Id's are a much cleaner and appropriate
method than those silly <a name="foo"></a> constructs
As a former fan of HTML/3.0 (sadly[1] expired before completion), I
can only agree with you, and express disappointment that it took
mainstream browsers -so- long to get around to implementing it.
and should be
adopted now irrespective of document type imo.


Depends whether you need it to work on the browsers that the punters
are using. In the current case, your authorial decision was that
graceful fallback was acceptable, and you have every right to that
decision; but it wouldn't always be that way.

cheers

[1] Of course there's a lot in the HTML/3.0 draft that wouldn't pass
scrutiny today - but for its time it contained a lot of good stuff,
hence the cries of anguish from the fans, back when HTML/3.2(spit) was
promulgated by the W3C.
Jul 20 '05 #11
"Alan J. Flavell" <fl*****@mail.cern.ch> wrote:
and should be
adopted now irrespective of document type imo.


Depends whether you need it to work on the browsers that the punters
are using. In the current case, your authorial decision was that
graceful fallback was acceptable, and you have every right to that
decision; but it wouldn't always be that way.


Certainly, I was able to do so because my documents that use fragment
identifiers are relatively small, so no great confusion occurs if a user
isn't taken to the precise spot in those documents.

It probably isn't advisable for large documents and if a large number of
clients use NS4.

But most of us are not so unfortunate as you (many NS4 users).
Headless

Jul 20 '05 #12

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

Similar topics

2
by: Rainer Birkenmaier | last post by:
Hi Folks, I have 2 little problems: 1) http://birkenmaier.org/b.php IE 6.0 does something weired here: in the red box the first lines of text have a slight indet (2 or 3 pixels only). This...
6
by: Viken Karaguesian | last post by:
Hello, Just wondering what the difference is between "float" and "align"? If I align a picture to the left, is that not the same as floating it? Can align and float be used together or do you...
16
by: Wolfgang Meier | last post by:
Hi, Although it might seem like I am firing out random posts in quick succession this matter is indeed one I thought about for quite some time without coming to a conclusion: Why is it that...
34
by: Xah Lee | last post by:
i have a very simple html doc using the following style: <style type="text/css"> ..x-note {background-color:#afeeee; margin:1ex; padding:1ex; float:right; line-height:130%; width:60ex;...
8
by: SAN CAZIANO | last post by:
i have to do in the onkeypress or in onchange the float (real) field validation I try something: function ValidaCampo(nomeCampo,TotInteri,TotDecimali) {...
55
by: drhowarddrfine | last post by:
I'm working on a web site that could use some control using js but am concerned about what problems I may have with potential users having their js turned off. Has anyone had any serious problems...
3
by: Tim | last post by:
hi, I have some code that works in all web browsers except IE 5.2 for Mac (heard this one before? :-) the CSS code basically creates two id's, one is a container for the other. eg: CSS...
116
by: Dilip | last post by:
Recently in our code, I ran into a situation where were stuffing a float inside a double. The precision was extended automatically because of that. To make a long story short, this caused...
22
by: ashkaan57 | last post by:
Hi, I am trying to put text on left and right side of the page and used: <div> <span>blah blah</span> <span style="float:right">blah blah</span> </div> The 2nd text does go to the right but the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.