/    Sign up×
Community /Pin to ProfileBookmark

XHTML Causing Problems

Hi Folks,

Quick question… (This is a project not a real website for a company! Hence the naff text on there) This site looks OK without the XHTML doctype tag, but has some problems with a white line above images on the right bar and bottom bar in IE. When i add the XHTML doctype i get the same problem in FF!

(The lines being above fairly downs, pile downs and numerous blocks in the footer).

Additionally, any ideas why my site dosent center in IE? ? Thanks for any help folks.

Regards,
Scott

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@FangMay 07.2009 — Probably: https://developer.mozilla.org/en/Images,_Tables,_and_Mysterious_Gaps

Need to see how you are centering and which version(s) of IE have the problem.

Centering in all browsers (if [I]position:absolute[/I] is not used):<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>Basic centering</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<style type="text/css">
#centered {text-align:center;}
#container {margin:0 auto; width:80%; text-align:left;}

</style>

</head>
<body>
<!-- Center contents -->
<div id="centered"><div id="container">
<div id="contents" style="border:1px solid red;">
<p>contents</p>
</div>
</div></div>
</body>
</html>
</body>
</html>
×

Success!

Help @SRobinson spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...