[RESOLVED] A simple question?

liunx

Guest
This is I'm sure a simple question to the gurus, but I'm totally screwed trying to find an answer.
I use GoLive and part way through a new page decided to check syntax, rather than leave it to the end. It came up with the following:-
<div align="center">
Error reads <div> The closing tag is missing line 18 col 9
But when I follow down all div tags have a closing tag.
Please advise.
Here is the doc type if needed
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />

BeemanThis is I'm sure a simple question to the gurus, but I'm totally screwed trying to find an answer.
I use GoLive and part way through a new page decided to check syntax, rather than leave it to the end. It came up with the following:-
<div align="center">
Error reads <div> The closing tag is missing line 18 col 9
But when I follow down all div tags have a closing tag.
Please advise.
Here is the doc type if needed
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />

Beeman

A DIV requires a matching close-tag:

<div>
your text, etc.
</div>

And align="center" really isn't a good way to center anything. To center a DIV, give it width="numberPX-or-percentage"; margin:0 auto; In order for "margin:0 auto" to work, you must declare a width.
The !doctype information doesn't tell us anything at this point.Yea, if anything could you post the web sites body code, where you have the actual DIV tag?

Also, align=center would be better if you put it in your CSS. If you are sure that you closed all of your DIV's but the error still comes up, try just adding another</div> at the end of the page to see what happens.That was my first post on this forum and I'm most impressed, thanks for the replies.
I have taken the advice for the future, but all I had to do was delete the <div align..> and the error went away. Not sure why GoLive put it there in the first place. Oh well, software....!!!
Thanks again.
Beeman.
 
Top