You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Simon Kitching <sk...@apache.org> on 2006/01/02 00:15:07 UTC

Re: AW: Rendering of HTML hr tag in Firefox 1.0 different than in Internet Explorer 6

Hi Matthias,

Viewing the following with Mozilla 1.7.8 shows the HR line centred. Are
you saying that Firefox does the same, but IE left-aligns the output?

<html>
<body>
This tests HR alignment
<hr style="width:50%"/>
</body>
</html>

I also tried:
  <hr style="width:50%; text-align: left"/>
and it's still centred, though you say you got left-alignment in
Firefox. The behaviour I saw (no change) is what I would expect; this is
a LINE, not a piece of text so text-align shouldn't have any effect. The
style "float:left" did left-align the rule for me.

Regardless, I don't think this qualifies as a MyFaces issue. If you want
to follow this up, you need to talk to Microsoft, Mozilla and the
W3C :-)

I would also be very careful about claiming the bug is in Firefox; in my
experience it is far more likely that the buggy
(non-standards-compliant) behaviour is actually that of IE...

Regards,

Simon

On Sun, 2006-01-01 at 23:54 +0100, Matthias Kahlau wrote:
> Hi!
> 
> 
> I tested the rendering of the "hr" tag in Firefox 1.0 again, this time with
> a CSS Stylesheet class to align the "hr" on the left side, and not with the
> "style" attribute in the "hr" tag.
> 
> The test showed that the misbehaviour of Firefox 1.0 of rendering the "hr"
> in the center must be caused by a browser bug. The "hr" is left-aligned when
> the exactly same test page is rendered with IE 6.0, as expected.
> 
> 
> 
> Regards,
> 
> Matthias
> 
> > -----Ursprüngliche Nachricht-----
> > Von: users-return-14126-mkahlau=web.de@myfaces.apache.org
> > [mailto:users-return-14126-mkahlau=web.de@myfaces.apache.org]Im Auftrag
> > von Simon Kitching
> > Gesendet: Donnerstag, 22. Dezember 2005 02:47
> > An: MyFaces Discussion
> > Betreff: Re: Rendering of HTML hr tag in Firefox 1.0 different than in
> > Internet Explorer 6
> >
> >
> > Matthias Kahlau wrote:
> > > I use the following tags in my Nightly 20051130 JSF site:
> > >
> > > <f:verbatim><hr class="formSeparator"></f:verbatim>
> > >
> > >
> > > The CSS class defines "text-align:left". When the site is
> > rendered with IE
> > > 6, the "hr" is aligned left, as intended. But in Firefox 1.0,
> > the "hr" is
> > > centered, unfortunately.
> > >
> > > I tested the "hr" with the "text-align:left" in a simple HTML
> > site without
> > > using MyFaces - it's left aligned in both browsers. Is this a
> > known problem
> > > already?
> >
> > Any content inside an f:verbatim is just output as plain text; MyFaces
> > doesn't touch it in any way. So I would really be surprised if there's
> > anything in MyFaces that needs fixing for this.
> >
> > I recommend looking at the generated HTML using the browser's "view
> > source" to see what the problem might be.
> >
> > Regards,
> >
> > Simon
> 


AW: AW: Rendering of HTML hr tag in Firefox 1.0 different than inInternet Explorer 6

Posted by Matthias Kahlau <mk...@web.de>.
Hi Simon!


I always thought that "text-align" is the CSS equivalent of "align" in HTML,
and didn't take the term "text" too literally, but related to the usually
horizontal direction of text in a page. But "text-align" applies (according
to the CSS 2 spec: http://www.w3.org/TR/CSS21/text.html#alignment-prop) to
block-level elements, table cells and inline blocks only - and Firefox 1.5
doesn't seem to consider HR as a one of these element types.

Using the HTML align="left" in the HR tag for Firefox is not optimal, since
the "align" attribute is deprecated (according to the HTML 4.01 spec:
http://www.w3.org/TR/html4/present/graphics.html#h-15.3).

To use CSS to left-align the HR in Firefox, I tried to set "display:block;"
in combination with the "text-align:left;" in the CSS class used for the HR
to make the HR a block-level element, but it doesn't work. Maybe because the
"float" attribute is set to "none" by default.

So I also set the "float" attribute of the HR's CSS class to left, and that
works in Firefox - the HR is left-aligned (and this should make the
"text-align:left;" obsolete in IE).

But although the "display:block;" is not needed in Firefox 1.5 to make the
floating work, it's necessary in IE (when not "text-align:left;" is used).
IE centers the HR without using "display:block;", although "float=left;" is
used.



Regards,

Matthias

> -----Ursprüngliche Nachricht-----
> Von: users-return-14505-mkahlau=web.de@myfaces.apache.org
> [mailto:users-return-14505-mkahlau=web.de@myfaces.apache.org]Im Auftrag
> von Matthias Kahlau
> Gesendet: Montag, 2. Januar 2006 00:57
> An: MyFaces Discussion; skitching@apache.org
> Betreff: AW: AW: Rendering of HTML hr tag in Firefox 1.0 different than
> inInternet Explorer 6
>
>
> Hi Simon!
>
>
> I know, this can't be a MyFaces issue because of using the f:verbatim
> element.
>
> You're right, <hr style="width:50%; text-align: left"/> in
> Firefox will also
> center the hr.
>
> What works is <hr align="left" />.
>
> I think this must be a Firefox issue, but I didn't find the bug in the
> bugzilla database (maybe it's registered, but I had to hurry...).
>
> The class I use to center the hr in IE is:
>
> HR.formSeparator {
>     height: 1px;
>     width: 780px;
>     color:rgb(232,247,233);
>     text-align:left;
> }
>
> And the tags I use in the JSF pages are:
>
> <f:verbatim><hr class="formSeparator"></f:verbatim>
>
>
> I don't think this is IE specific...
>
>
>
> Regards,
>
> Matthias
>
> > -----Ursprüngliche Nachricht-----
> > Von: users-return-14500-mkahlau=web.de@myfaces.apache.org
> > [mailto:users-return-14500-mkahlau=web.de@myfaces.apache.org]Im Auftrag
> > von Simon Kitching
> > Gesendet: Montag, 2. Januar 2006 00:15
> > An: MyFaces Discussion
> > Betreff: Re: AW: Rendering of HTML hr tag in Firefox 1.0 different than
> > inInternet Explorer 6
> >
> >
> > Hi Matthias,
> >
> > Viewing the following with Mozilla 1.7.8 shows the HR line centred. Are
> > you saying that Firefox does the same, but IE left-aligns the output?
> >
> > <html>
> > <body>
> > This tests HR alignment
> > <hr style="width:50%"/>
> > </body>
> > </html>
> >
> > I also tried:
> >   <hr style="width:50%; text-align: left"/>
> > and it's still centred, though you say you got left-alignment in
> > Firefox. The behaviour I saw (no change) is what I would expect; this is
> > a LINE, not a piece of text so text-align shouldn't have any effect. The
> > style "float:left" did left-align the rule for me.
> >
> > Regardless, I don't think this qualifies as a MyFaces issue. If you want
> > to follow this up, you need to talk to Microsoft, Mozilla and the
> > W3C :-)
> >
> > I would also be very careful about claiming the bug is in Firefox; in my
> > experience it is far more likely that the buggy
> > (non-standards-compliant) behaviour is actually that of IE...
> >
> > Regards,
> >
> > Simon
> >
> > On Sun, 2006-01-01 at 23:54 +0100, Matthias Kahlau wrote:
> > > Hi!
> > >
> > >
> > > I tested the rendering of the "hr" tag in Firefox 1.0 again,
> > this time with
> > > a CSS Stylesheet class to align the "hr" on the left side, and
> > not with the
> > > "style" attribute in the "hr" tag.
> > >
> > > The test showed that the misbehaviour of Firefox 1.0 of
> > rendering the "hr"
> > > in the center must be caused by a browser bug. The "hr" is
> > left-aligned when
> > > the exactly same test page is rendered with IE 6.0, as expected.
> > >
> > >
> > >
> > > Regards,
> > >
> > > Matthias
> > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: users-return-14126-mkahlau=web.de@myfaces.apache.org
> > > >
> > [mailto:users-return-14126-mkahlau=web.de@myfaces.apache.org]Im Auftrag
> > > > von Simon Kitching
> > > > Gesendet: Donnerstag, 22. Dezember 2005 02:47
> > > > An: MyFaces Discussion
> > > > Betreff: Re: Rendering of HTML hr tag in Firefox 1.0
> different than in
> > > > Internet Explorer 6
> > > >
> > > >
> > > > Matthias Kahlau wrote:
> > > > > I use the following tags in my Nightly 20051130 JSF site:
> > > > >
> > > > > <f:verbatim><hr class="formSeparator"></f:verbatim>
> > > > >
> > > > >
> > > > > The CSS class defines "text-align:left". When the site is
> > > > rendered with IE
> > > > > 6, the "hr" is aligned left, as intended. But in Firefox 1.0,
> > > > the "hr" is
> > > > > centered, unfortunately.
> > > > >
> > > > > I tested the "hr" with the "text-align:left" in a simple HTML
> > > > site without
> > > > > using MyFaces - it's left aligned in both browsers. Is this a
> > > > known problem
> > > > > already?
> > > >
> > > > Any content inside an f:verbatim is just output as plain
> text; MyFaces
> > > > doesn't touch it in any way. So I would really be surprised
> if there's
> > > > anything in MyFaces that needs fixing for this.
> > > >
> > > > I recommend looking at the generated HTML using the browser's "view
> > > > source" to see what the problem might be.
> > > >
> > > > Regards,
> > > >
> > > > Simon
> > >
> >
>


AW: AW: Rendering of HTML hr tag in Firefox 1.0 different than inInternet Explorer 6

Posted by Matthias Kahlau <mk...@web.de>.
Hi Simon!


I know, this can't be a MyFaces issue because of using the f:verbatim
element.

You're right, <hr style="width:50%; text-align: left"/> in Firefox will also
center the hr.

What works is <hr align="left" />.

I think this must be a Firefox issue, but I didn't find the bug in the
bugzilla database (maybe it's registered, but I had to hurry...).

The class I use to center the hr in IE is:

HR.formSeparator {
    height: 1px;
    width: 780px;
    color:rgb(232,247,233);
    text-align:left;
}

And the tags I use in the JSF pages are:

<f:verbatim><hr class="formSeparator"></f:verbatim>


I don't think this is IE specific...



Regards,

Matthias

> -----Ursprüngliche Nachricht-----
> Von: users-return-14500-mkahlau=web.de@myfaces.apache.org
> [mailto:users-return-14500-mkahlau=web.de@myfaces.apache.org]Im Auftrag
> von Simon Kitching
> Gesendet: Montag, 2. Januar 2006 00:15
> An: MyFaces Discussion
> Betreff: Re: AW: Rendering of HTML hr tag in Firefox 1.0 different than
> inInternet Explorer 6
>
>
> Hi Matthias,
>
> Viewing the following with Mozilla 1.7.8 shows the HR line centred. Are
> you saying that Firefox does the same, but IE left-aligns the output?
>
> <html>
> <body>
> This tests HR alignment
> <hr style="width:50%"/>
> </body>
> </html>
>
> I also tried:
>   <hr style="width:50%; text-align: left"/>
> and it's still centred, though you say you got left-alignment in
> Firefox. The behaviour I saw (no change) is what I would expect; this is
> a LINE, not a piece of text so text-align shouldn't have any effect. The
> style "float:left" did left-align the rule for me.
>
> Regardless, I don't think this qualifies as a MyFaces issue. If you want
> to follow this up, you need to talk to Microsoft, Mozilla and the
> W3C :-)
>
> I would also be very careful about claiming the bug is in Firefox; in my
> experience it is far more likely that the buggy
> (non-standards-compliant) behaviour is actually that of IE...
>
> Regards,
>
> Simon
>
> On Sun, 2006-01-01 at 23:54 +0100, Matthias Kahlau wrote:
> > Hi!
> >
> >
> > I tested the rendering of the "hr" tag in Firefox 1.0 again,
> this time with
> > a CSS Stylesheet class to align the "hr" on the left side, and
> not with the
> > "style" attribute in the "hr" tag.
> >
> > The test showed that the misbehaviour of Firefox 1.0 of
> rendering the "hr"
> > in the center must be caused by a browser bug. The "hr" is
> left-aligned when
> > the exactly same test page is rendered with IE 6.0, as expected.
> >
> >
> >
> > Regards,
> >
> > Matthias
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: users-return-14126-mkahlau=web.de@myfaces.apache.org
> > >
> [mailto:users-return-14126-mkahlau=web.de@myfaces.apache.org]Im Auftrag
> > > von Simon Kitching
> > > Gesendet: Donnerstag, 22. Dezember 2005 02:47
> > > An: MyFaces Discussion
> > > Betreff: Re: Rendering of HTML hr tag in Firefox 1.0 different than in
> > > Internet Explorer 6
> > >
> > >
> > > Matthias Kahlau wrote:
> > > > I use the following tags in my Nightly 20051130 JSF site:
> > > >
> > > > <f:verbatim><hr class="formSeparator"></f:verbatim>
> > > >
> > > >
> > > > The CSS class defines "text-align:left". When the site is
> > > rendered with IE
> > > > 6, the "hr" is aligned left, as intended. But in Firefox 1.0,
> > > the "hr" is
> > > > centered, unfortunately.
> > > >
> > > > I tested the "hr" with the "text-align:left" in a simple HTML
> > > site without
> > > > using MyFaces - it's left aligned in both browsers. Is this a
> > > known problem
> > > > already?
> > >
> > > Any content inside an f:verbatim is just output as plain text; MyFaces
> > > doesn't touch it in any way. So I would really be surprised if there's
> > > anything in MyFaces that needs fixing for this.
> > >
> > > I recommend looking at the generated HTML using the browser's "view
> > > source" to see what the problem might be.
> > >
> > > Regards,
> > >
> > > Simon
> >
>