hr

G

Guest

All of a sudden all the horizontal rules in my site have been
misbehaving.(only the 50% centered rules that are centered) are displaying
left justified in IE thugh they are centered as specfied in FF.
I checked the code and can't see why.

XP FP 2003
Site at bill.goldschein.name

thanx
bill
 
M

Murray

Bill:

You have 2 <hr> tags there -

<hr color="#336699" width="50%">
....
<hr color="#FF0000">

The top on is the one that is centering in FF, and that's because it's in
this table cell -

<td valign="top" align="center" background="images/600%20TF.JPG"
(by the way - get rid of the spaces and mixed case in your file/pathnames -
it will bite you sooner or later)

The bottom <hr> is not centering at all.

There are two things happening there. You would only see the centering if
you assigned a width to the <hr> less than the width of the container (an
<hr> tag will expand to fill its container without a width), which you have
done in the first instance. However, since the page is being rendered in
quirks mode (i.e., it does not have a valid and complete doctype), IE
ignores the centering on the container <td>, and left aligns both <hr> tags.

To see them both center, do this -

<hr style="width:50%; margin:0 auto;">

and that should do the trick.
 
G

Guest

thanks but it doesn't work.

What do you mean
However, since the page is being rendered in
 
G

Guest

Why is it suddenly happening.
It's been this way for 3 months. and suddenly displays wrong in IE only

What is auto in :
<hr style="width:50%; margin:0 auto;">
Can I create a style in an external css?
 
M

Murray

thanks but it doesn't work.

Yes - it does. Show me your implementation, please.
What do you mean
However, since the page is being rendered in

Browsers will render your page in quirks mode, since it does not have a
valid and complete doctype, rather than standards mode. Since each
browser's interpretation of your code is different in quirks mode, you can
expect to see some potentially significant differences in how they render
moving from one browser/platform to another. To read more about doctypes
and doctype switching, go here -

http://www.ericmeyeroncss.com/bonus/render-mode.html
 
M

Murray

Why is it suddenly happening.
It's been this way for 3 months. and suddenly displays wrong in IE only

I have no explanation - cosmic rays? 8)
What is auto in :
<hr style="width:50%; margin:0 auto;">

It means take the width of the element, subtract it from the avaiable width
of the container, and put half of that remainder left and right as margins -
in other words, center the element horizontally.
Can I create a style in an external css?

Yes, sure.
 
G

Guest

On the about.htm page of bill.goldschein.name

I have never specified a doc type and never had a problem.
Why doesn't FP do it?
Why does FF handle everything better
 
M

Murray

I have never specified a doc type and never had a problem.

You will.
Why doesn't FP do it?

Do what - insert a doctype? It can. Mine does. But you have to tell it to
do so. Find this file, make a backup copy, and then edit it in Notepad -

C:\Program Files\Microsoft Office\Templates\1033\PAGES11\normal.tem

to add your desired Doctype. Mine looks like this -

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"

x-undefined>
</head>

<body>
</body>

</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top