9 replies [Last post]
MaThIbUs
Offline
newbie
Belgium, Dendermonde
Last seen: 15 years 21 weeks ago
Belgium, Dendermonde
Timezone: GMT+1
Joined: 2004-02-19
Posts: 7
Points: 0

Check this out. I made that page XHTML valid, but when I put the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> tag, the page looks messed up.

However, when I replace that tag, it looks great.

Is this a browser (IE) problem? Does it look good on Mozilla or any other browser? And how can I fix this?

Thanks in advance!

Big John
Big John's picture
Offline
Enthusiast
Arizona
Last seen: 15 years 37 weeks ago
Arizona
Timezone: GMT-7
Joined: 2003-10-29
Posts: 94
Points: 0

XHTML page - DOCTYPE tag messes up the design

http//www.positioniseverything.net/

skyrocket
skyrocket's picture
Offline
Enthusiast
Sydney - Australia
Last seen: 15 years 30 weeks ago
Sydney - Australia
Timezone: GMT+10
Joined: 2003-12-18
Posts: 71
Points: 0

XHTML page - DOCTYPE tag messes up the design

The page looks "messed up" in Mozilla 1.5 on a MAC too. The white background only stretches across half the page. Validates as XHTML strict. Haven't looked at your CSS but I would guess you have the width settings for that divstyled incorrectly?

PAUL - SkyRocket Design Co
web design sydney northern beaches

MaThIbUs
Offline
newbie
Belgium, Dendermonde
Last seen: 15 years 21 weeks ago
Belgium, Dendermonde
Timezone: GMT+1
Joined: 2004-02-19
Posts: 7
Points: 0

XHTML page - DOCTYPE tag messes up the design

Big John > I read that article, but it didn't really answer my question...

skyrocket > The CSS file also validates on W3C, if that's what you mean... Please have a look at it, ithankyou Smile

[Valid XHTML page]

[Valid CSS file]

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 15 years 35 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

XHTML page - DOCTYPE tag messes up the design

Just because the code validates does not mean you coded it right.

Validation does not know how your site should look, it just checks to see if the code is written correctly. For example validation can never advise you on whether you are using correct widths to match another Div or not.

Regards
Day

The only way to learn is to do it yourself

MaThIbUs
Offline
newbie
Belgium, Dendermonde
Last seen: 15 years 21 weeks ago
Belgium, Dendermonde
Timezone: GMT+1
Joined: 2004-02-19
Posts: 7
Points: 0

XHTML page - DOCTYPE tag messes up the design

Indeed, but I just can't find a way to get the design right!

Can anyone *please* look at the CSS file and try to fix it? Thanks in advance...

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 3 weeks 3 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

XHTML page - DOCTYPE tag messes up the design

Hi MaThIbUs,
I'm not really sure if this is what you are after but try changing content to this:

.content { 
background: #fff; 
width: 460px; 
padding:5px; 
}

Hope that helps

MaThIbUs
Offline
newbie
Belgium, Dendermonde
Last seen: 15 years 21 weeks ago
Belgium, Dendermonde
Timezone: GMT+1
Joined: 2004-02-19
Posts: 7
Points: 0

XHTML page - DOCTYPE tag messes up the design

Thanks a bunch, Tony!

It's fixed now! Smile

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 15 years 35 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

XHTML page - DOCTYPE tag messes up the design

Daybreak_0 wrote:
Just because the code validates does not mean you coded it right.

Validation does not know how your site should look, it just checks to see if the code is written correctly. For example validation can never advise you on whether you are using correct widths to match another Div or not.

Regards
Day

LOL sorry Mathibus - I completely misread your original post.

Regards
Day

The only way to learn is to do it yourself

MaThIbUs
Offline
newbie
Belgium, Dendermonde
Last seen: 15 years 21 weeks ago
Belgium, Dendermonde
Timezone: GMT+1
Joined: 2004-02-19
Posts: 7
Points: 0

XHTML page - DOCTYPE tag messes up the design

Oh okay Smile Your post kinda confuzzled me Laughing out loud

Anyway, problem solved!