Page centered in IE7 but not in FF2.0

Page centered in IE7 but not in FF2.0

am 13.11.2007 22:38:00 von a-ok-site

I am in the process of trying to build a template for my web site
using only CSS, but when it is viewed with IE7 it is centered, but
with Firefox 2.0 it is floated left. I really don't mind which way it
is but I would like it to be the same across browsers. Does anybody
have a suggestion or cure? Any help will be appreciated! The url is a-
ok-site.com.

Thanks,

Daniel

Re: Page centered in IE7 but not in FF2.0

am 13.11.2007 23:11:40 von Richard

On Tue, 13 Nov 2007 13:38:00 -0800, a-ok-site wrote:

> I am in the process of trying to build a template for my web site
> using only CSS, but when it is viewed with IE7 it is centered, but
> with Firefox 2.0 it is floated left. I really don't mind which way it
> is but I would like it to be the same across browsers. Does anybody
> have a suggestion or cure? Any help will be appreciated! The url is a-
> ok-site.com.
>
> Thanks,
>
> Daniel

One thing you might try is to simply use

before your first
division and close it with
.

Your javascript should also be in a seperate file as your css is.

Re: Page centered in IE7 but not in FF2.0

am 13.11.2007 23:55:03 von a.nony.mous

a-ok-site wrote:

> I am in the process of trying to build a template for my web site
> using only CSS, but when it is viewed with IE7 it is centered, but
> with Firefox 2.0 it is floated left.

Unless you changed it since posting, it is the same for me in several
browsrers.

> I really don't mind which way it is but I would like it to be the same
> across browsers. Does anybody have a suggestion or cure? Any help
> will be appreciated! The url is:

http://a-ok-site.com/ <-- please post URLs in this format

You will want to correct a bug .. the IE resizing bug.

body { ...
font-family: arial,comic sans ms,technical;
font-size: 1.0em;

Change the size from 1.0em to 100%

You should also assign a fallback font (and Comic Sans MS needs quotes
around it, and both it and Technical are poor choices). I would
recommend:

font-family: Tahoma, "Trebuchet MS", Helvetica, Arial, sans-serif;

--
-bts
-Motorcycles defy gravity; cars just suck

Re: Page centered in IE7 but not in FF2.0

am 14.11.2007 00:21:05 von tabkanDELETETHISnaz

a-ok-site wrote:

> I am in the process of trying to build a template for my web site
> [...]

Why the h*ll did you use this awful script (on )?

> function MM_reloadPage(init) { //reloads the window if Nav4 resized
> if (init==true) with (navigator) {if
> ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
> document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
> onresize=MM_reloadPage; }}
> else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
> location.reload();
> }
> MM_reloadPage(true);

This has the effect of reloading the page in Netscape 4.x (and no other
browser) when the browser window is resized. This is totally useless as
the reloaded page is identical to the previous one.

--
If you've a question that doesn't belong to Usenet, contact me at

Re: Page centered in IE7 but not in FF2.0

am 14.11.2007 00:49:34 von a-ok-site

On Nov 13, 5:21 pm, "Andr=E9 Gillibert"
wrote:
> a-ok-site wrote:
> > I am in the process of trying to build a template for my web site
> > [...]
>
> Why the h*ll did you use this awful script (on )?
>
> > function MM_reloadPage(init) { //reloads the window if Nav4 resized
> > if (init==true) with (navigator) {if
> > ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
> > document.MM_pgW=3DinnerWidth; document.MM_pgH=3DinnerHeight;
> > onresize=3DMM_reloadPage; }}
> > else if (innerWidth!=3Ddocument.MM_pgW || innerHeight!=3Ddocument.MM_=
pgH)
> > location.reload();
> > }
> > MM_reloadPage(true);
>
> This has the effect of reloading the page in Netscape 4.x (and no other
> browser) when the browser window is resized. This is totally useless as
> the reloaded page is identical to the previous one.
>
> --
> If you've a question that doesn't belong to Usenet, contact me at
>

Thanks DW MX was helping and I didn't know any better. It's out of
there.

Daniel

Re: Page centered in IE7 but not in FF2.0

am 14.11.2007 01:41:16 von Richard

One thing I noticed that should you stay away from is using the same name
for both class and ID divisions. ID is supposed to unique and can only be
used once per page.

You show

as well as
.
It is also not a good idea to use "tag words" as names. If you insist, use
something like "acenter" and "bcenter".

Re: Page centered in IE7 but not in FF2.0

am 14.11.2007 01:56:15 von rf

"André Gillibert" wrote in message
news:op.t1q65fci7pu1mk@andre...
> a-ok-site wrote:
>
>> I am in the process of trying to build a template for my web site
>> [...]
>
> Why the h*ll did you use this awful script (on )?
>
>> function MM_reloadPage(init) { //reloads the window if Nav4 resized
>> if (init==true) with (navigator) {if
>> ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
>> document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
>> onresize=MM_reloadPage; }}
>> else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
>> location.reload();
>> }
>> MM_reloadPage(true);
>
> This has the effect of reloading the page in Netscape 4.x (and no other
> browser) when the browser window is resized. This is totally useless as
> the reloaded page is identical to the previous one.

This is to fix a bug in some netscape version from way back in last century.
NS3 or 4 IIRC. It would not repaint the canvas correctly after a resize.

Such cargo cult stuff is one of the prime indicators of Dreamweaver. Along
with javascript rollovers instead of CSS.

--
Richard.

Re: Page centered in IE7 but not in FF2.0

am 14.11.2007 11:37:09 von CV

richard wrote:

> You show

as well as
.
> It is also not a good idea to use "tag words" as names. If you insist, use
> something like "acenter" and "bcenter".

Using '.center' is fine because
is a deprecated presentational
element and shouldn't be thought of as a tag at all.

Re: Page centered in IE7 but not in FF2.0

am 14.11.2007 11:48:36 von jkorpela

Scripsit John L.:

> richard wrote:
>
>> You show

as well as
.
>> It is also not a good idea to use "tag words" as names. If you
>> insist, use something like "acenter" and "bcenter".

That was clueless, not unexpectedly considering the posting history.

> Using '.center' is fine because
is a deprecated
> presentational element and shouldn't be thought of as a tag at all.

That wasn't much better. You give advice on HTML in public but cannot even
distinguish between elements and tags. Moreover, using "center" as a class
name is basically as presentational as
or
.
Actually the so-called deprecated markup alternatives are better because
they are more honest: the say, in HTML, what presentational effect is
desired, whereas class="center" assigns just a class name, with no meaning
defined in HTML, and not suggestive of _semantics_ to a human reader.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Re: Page centered in IE7 but not in FF2.0

am 14.11.2007 19:25:48 von tabkanDELETETHISnaz

rf wrote:

>
> "André Gillibert" wrote in
> message
> news:op.t1q65fci7pu1mk@andre...
>> This has the effect of reloading the page in Netscape 4.x (and no other
>> browser) when the browser window is resized. This is totally useless as
>> the reloaded page is identical to the previous one.
>
> This is to fix a bug in some netscape version from way back in last
> century.
> NS3 or 4 IIRC. It would not repaint the canvas correctly after a resize.
>
The page doesn't raise layout bugs that could be solved by reloading with
NS4.7 or NS4.08.
(I tested it)
So, the script is most probably useless.

> Such cargo cult stuff is one of the prime indicators of Dreamweaver.
> Along
> with javascript rollovers instead of CSS.

That's an argument in favor of designing with a pure text editor.

--
If you've a question that doesn't belong to Usenet, contact me at

Re: Page centered in IE7 but not in FF2.0

am 14.11.2007 22:36:56 von Ben C

On 2007-11-14, Jukka K. Korpela wrote:
> Scripsit John L.:
>
>> richard wrote:
>>
>>> You show

as well as
.
>>> It is also not a good idea to use "tag words" as names. If you
>>> insist, use something like "acenter" and "bcenter".
>
> That was clueless, not unexpectedly considering the posting history.
>
>> Using '.center' is fine because
is a deprecated
>> presentational element and shouldn't be thought of as a tag at all.
>
> That wasn't much better. You give advice on HTML in public but cannot even
> distinguish between elements and tags. Moreover, using "center" as a class
> name is basically as presentational as
or
.
> Actually the so-called deprecated markup alternatives are better because
> they are more honest: the say, in HTML, what presentational effect is
> desired, whereas class="center" assigns just a class name, with no meaning
> defined in HTML, and not suggestive of _semantics_ to a human reader.

I'm all in favour of honesty, but
and align="center" are
perhaps less likely to be supported in newer and/or future browsers
(surely that's part of the sense of "deprecated"?)

Re: Page centered in IE7 but not in FF2.0

am 15.11.2007 00:22:09 von dorayme

In article ,
Ben C wrote:

> On 2007-11-14, Jukka K. Korpela wrote:
> > Scripsit John L.:
> >
> >> richard wrote:
> >>
> >>> You show

as well as
.
> >>> It is also not a good idea to use "tag words" as names. If you
> >>> insist, use something like "acenter" and "bcenter".
> >
> > That was clueless, not unexpectedly considering the posting history.
> >
> >> Using '.center' is fine because
is a deprecated
> >> presentational element and shouldn't be thought of as a tag at all.
> >
> > That wasn't much better. You give advice on HTML in public but cannot even
> > distinguish between elements and tags. Moreover, using "center" as a class
> > name is basically as presentational as
or
.
> > Actually the so-called deprecated markup alternatives are better because
> > they are more honest: the say, in HTML, what presentational effect is
> > desired, whereas class="center" assigns just a class name, with no meaning
> > defined in HTML, and not suggestive of _semantics_ to a human reader.
>
> I'm all in favour of honesty, but
and align="center" are
> perhaps less likely to be supported in newer and/or future browsers
> (surely that's part of the sense of "deprecated"?)

Apart from the deprecation issue, however important:

If a list is wanted to be styled to centre in a container, and
is used to do it, or it is styled in css to so center,
the normal sighted viewer of a web page is no wiser either way.

If a screen reader is involved, I am hazy on what happens in
respect to the difference?

If someone reads the actual html source, and does not read the
css, then it could be said that they are equally informed by the
use of
as by
...
. In other words, against all good
practice, it would clue up the reader with no need to see the
css.

If best practice was used and the class was based on need to so
style all such elements - e.g. class="outsideLinks" then the
human who did not look at the actual css would know at least and
at most that all such classes have some style or other. Still not
as singularly meaningful as
.

If a name, according to best practice, is given to an element
that does not conjure up the style but only the function of the
element itself and there are no other instances of this class -
the exercise being done purely formally to follow good practice -
then, once again,
and
... would
have been more meaningful.

I think I will stop now, I am getting nowhere. But it was a break
from removing the millions of spots and things on the poster I am
restoring.

--
dorayme

Re: Page centered in IE7 but not in FF2.0

am 15.11.2007 00:56:16 von jkorpela

Scripsit Ben C:

> I'm all in favour of honesty, but

and align="center" are
> perhaps less likely to be supported in newer and/or future browsers

Now and in the foreseeable future, they surely take effect more often than
the CSS counterpart, since the latter will be ignored when CSS is disabled.
Whether this is a good thing depends on the purpose and context. Few authors
realize that it's _good_ to be easily overridable.

> (surely that's part of the sense of "deprecated"?)

In theory perhaps. There's no sign of anything like that happening in this
century.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/