Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Firefox display 1

Status
Not open for further replies.

SQLScholar

Programmer
Aug 21, 2002
2,127
GB
Hey all.

I cant work out what i have done to make firefox view my website incorrectly.

The website is
IE looks fine, Firefox the text seems to have gone wierd.

Anyone shed me some light.

Daniel

----------------------------------------
There are 2 types of computer, the prototype and the obsolete!!
----------------------------------------
No D, just plank - and its not my fault
 
What are Doctype declarations?

I just made this in dreamweaver.

Dan

----------------------------------------
There are 2 types of computer, the prototype and the obsolete!!
----------------------------------------
No D, just plank - and its not my fault
 
Dreamweaver wouldn't make code like that unless you made it :)

Look at your source code.
The very first line reads:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]

That's a Doctype. It's purpose is to tell the browser (or device) what flavour of (X)HTML is being used to code the page. This helps the browser display it in the correct way as it knows what to expect.
You are only meant to have 1 Doctype as the very first line of your code.

You seem to have multiple Doctype declarations throughout the body of your code. It is highly likely therefore that Firefox is getting upset by it since Firefox is pretty strict when it comes to how a page is coded. Internet Explorer on the other hand is much more forgiving and allows for sloppy coding practices. That's not a criticism of you, just an explanation of how IE behaves!

Remove the eronious Doctypes and see what happens. It might fix it, it might not. Either way it will be a step closer to fixing it and is defintely the first thing to do.

Now, as I said, Dreamweaver won't do this unless you make it. My guess is that you have either :
[ul]
[li]copy and pasted chunks of code without really knowing what the code means[/li]
[li]created multiple documents and included them using server side includes[/li]
[/ul]

WYSIWYG editors such as Dreamweaver are great tools, but as with any tool, you won't get the best out of it unless you understand what it's doing.

Foamcow Heavy Industries - Web design and ranting
Buy Languedoc wines in the UK
 
I did the whole site in DW and never touched the HTML. Odd!

Thanks

dan

----------------------------------------
There are 2 types of computer, the prototype and the obsolete!!
----------------------------------------
No D, just plank - and its not my fault
 
As Foamcow said above, even if you intend to use DW you should have some understanding of HTML. There is a good basic tutorial here:

I also find that if there is any 'issues' with a page you should check that it is valid HTML. There are several validators available including:

There are also some CSS validators:

Another useful tool is the Firefox Developer Toolbar extension:

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top