Forum Moderators: open

Message Too Old, No Replies

DOCTYPE Confusion

         

a01020304

8:17 pm on Jun 18, 2009 (gmt 0)

10+ Year Member



I have changed a few things since last night, am going to try another image viewer. Only problem is it requires my site to have a DOCTYPE on my site.

I have tried all the different types of DOCTYPE but the screen goes all over the place and image/text weird.

Has anyone any suggestions?

<removed links>

what can be done so the site has doctype but looks like the first link.

I dont want to have to do loads of code changes as over 130 pages and that will frustrate me

[edited by: incrediBILL at 8:49 pm (utc) on June 18, 2009]
[edit reason] removed URLs, see TOS #13 [/edit]

a01020304

9:19 pm on Jun 18, 2009 (gmt 0)

10+ Year Member



as someone has deleted my links how can you all see my problem?

a01020304

9:20 pm on Jun 18, 2009 (gmt 0)

10+ Year Member



I need this issue sorted and how can i get advice if you cannot see the issue

rocknbil

9:40 pm on Jun 18, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard a01020304, there are various reasons for not allowing links, although I don't agree with some of them the answer is to reduce the code to it's bare minimum and post it here. This allows thread participants to "be on the same page" when commenting on the code. For example, you post a link, someone makes a suggestion, you change the page in the link, later participants are now looking at a different code.

I have tried all the different types of DOCTYPE but the screen goes all over the place and image/text weird.

A valid doctype is the first step to Standards Compliance Mode. Choosing the best doctype for your site [webmasterworld.com]

The opposing rendering mode is Quirks Mode, in which not all of your CSS selectors will work. Quirks Mode is triggered by invalid coding or an invalid doctype. This non-standard coding is handled differently by different browsers, which is why when you get it working in one browser it breaks in another.

By coding to standards and insuring you are in Standards Compliance Mode, you will see much less difference in Standards Compliant browsers, although everyone's Microsoft favorite still has it's problems.

How to tell which is which? In FireFox, right-click any background area of a web page and select "View Page Info." Look at render mode. (on this page, you will see the render mode is Quirks Mode.)

Validate your code [validator.w3.org] to get started on the right path.

a01020304

10:56 am on Jun 19, 2009 (gmt 0)

10+ Year Member



My site works fine in all browsers when it does not have a doctype listed.

All I want to do is use a javascript and it does not work when I do not have a doctytpe. As soon as i put a doctype my site is mess.

The main thing I have with my site is I am using sexylightbox script to show images. It works fine without doctype. But i seen a script called Lightview. It requires doctype.

I want a image viewer that had a slideshow and 1 of 2 images feature and does not require doctype. Lightview has that but sexylightbox does not.

jkovar

11:45 am on Jun 19, 2009 (gmt 0)

10+ Year Member



You're pretty much screwed if you don't want to take the time to fix the errors for a single DOCTYPE using the validation tool rnb listed.

You usually can't just plop a DOCTYPE in and expect things to work right. That would be like building a house, and then drawing up a blueprint for the house after it's done.

rocknbil

2:33 pm on Jun 19, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



a01020304 sorry don't have time at the moment to respond to the PM, but right off the bat I noticed you are using a FRAMESET doctype. Frameset doctypes are for, well, frames.

Review the "choosing the doctype" link above; you should probably select one of the HTML 4.01 loose or strict doctypes and start from there. Your document uses a variety of problematic approaches: table layout combined with absolutely positioned divs - it is most likely going to take a little bit of "back to square one" to fix correctly.

So strip down a test page to it's bare minimum, apply the doctype, test it through the validator link provided above. Get it to validate, or as close to validation as possible. Post the code and CSS here for other members to see, they will be able to help you through it.