/    Sign up×
Community /Pin to ProfileBookmark

Ive created a simple layout using CSS it looks good in IE for the positioning anyway but when i look at it in netscape and opera it jumps down by about 3-5px. ive attached the file can anyone please help. Is my code wrong?

Cheers
Chris Sharkey

[upl-file uuid=785916b4-e93e-4375-a90c-09163b2ea95e size=790B]css.txt[/upl-file]

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@FangJan 20.2004 — You forgot the bdy margin and the vertical(top) position of #banner

Something like this:

body {margin:0;}

#banner {

top:10px;

position:absolute;

width:697px;

height:170px;

background-color:gray;

margin-left:140px;

display:block

}

Use a standard valid DTD:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">
Copy linkTweet thisAlerts:
@johndoe190authorJan 20.2004 — Great thanks alot Fang you have made my day alot easier yeah i left the DTD out by mistake. Cheers again. One more thing does the body {margin:0;} does this just set all the margins the same.

Cheers

Chris Sharkey
Copy linkTweet thisAlerts:
@FangJan 20.2004 — yes
×

Success!

Help @johndoe190 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.20,
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,
)...