center issue using <div>

M

Mr. X.

Hello.
I work by centering the elements on the browser using <div>

The following code doesn't center the elements, on IE 5.5 and lower.
Is there any technique to center the elements ?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="test_nav.css" />
<SCRIPT SRC="Main.js" type="text/javascript">
</SCRIPT>
</head>
<body bgcolor = "lightblue">
<div id = "wrap">
</div>
</body>
</html>

test_nav.html
=========
#wrap
{
top:0;
height:850px;
width:760px;
margin:auto;
background-color:red;
}

Thanks :eek:)
 
D

dorayme

"Mr. X. said:
The following code doesn't center the elements, on IE 5.5 and lower

Why worry about IE5? You do not mention that it does not centre in IE6,
a browser still in significant use.
 
M

Mr. X.

Should I worry about IE 5.5 ?
People still using it ? What the IE 5.5 usage popularity ?

It works on IE 6.0.

Thanks :)
 
D

dorayme

"Mr. X. said:
It works on IE 6.0.

It does? How can we know?

How can we know what is in your

<SCRIPT SRC="Main.js" type="text/javascript">
</SCRIPT>

when you simply quote this without a real URL.
 
E

Els

Mr. X. said:
I work by centering the elements on the browser using <div>

<div> does not center anything. The CSS styles that apply to whichever
div you choose do.
The following code

No code. URL please.
doesn't center the elements, on IE 5.5 and lower.

As dorayme says, why worry about IE5.
Is there any technique to center the elements ?

Yes.
http://locusmeus.com/html-css/centeringpage.html

This is the last time I reply to any of your questions if you don't:
- provide a URL up front
- reply to something with a quote of the text you are replying to.

(just so you know :))
 
R

richard

Hello.
I work by centering the elements on the browser using <div>

The following code doesn't center the elements, on IE 5.5 and lower.
Is there any technique to center the elements ?

Do you know of anyone still using windows 95 or 98?
That's about the time IE5 came out.
I'd just worry about how things work in the more modern browsers.
The way I see it, if it works in the four most popular browsers, why
worry about the others? It ain't my problem that a user won't upgrade.
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top