/    Sign up×
Community /Pin to ProfileBookmark

I am at the start of a new site and have now i have got it in the center i now need to sort the background out.

the section “backgroun_main” i need it to be 100% but when i do that nothing happens or when i try to add a new div tag inside it goes nuts.

i need to know how to make other divs work inside that div.

code;

[code=php]<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<style type=”text/css”>
#center_site {
position: absolute;
height: auto;
width: 750px;
top: 200px;
left: 50%;
margin: -200px 0px 0px -380px;
}

#background_main {
position:absolute;
left: 0;
top: 0;
width: 750px;
height: auto;
margin: 0;
padding: 0;
background: #FFF;
}

#2 {
position:absolute;
left: 0;
top:200px;
width: 100px;
height: auto;
margin:0px;
padding:0px;
background: #ff0;
}

#3 {
position:absolute;
left: 0;
top:0px;
width: 50px;
height: 50;
margin:0px;
padding:0px;
background: #110;
}
</style>
<title>Untitled Document</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>

<div id=”center_site”>
<body background=”tile.gif”>

<div id=”background_main”>

</div>

<span id=”2″>&nbsp;<div id=”3″></div></span>

</body>
</div>
</html>[/code]

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@Robert_WellockNov 13.2003 — It is not advisable to use the underscore for class names.

Furthermore using #2 is illegal in CSS you cannot begin id's with numeric values, get those issues sorted first.

?
Copy linkTweet thisAlerts:
@chris9902authorNov 13.2003 — ummm... ok
Copy linkTweet thisAlerts:
@toicontienNov 14.2003 — You'll get much more predictable results if you write standards comliance HTML. Browsers will work in standards comliance mode with a correct DOCTYPE specified and characterset. Otherwise, browsers work in Quirks mode, and support for CSS is very tempermental in this mode.

I was able to get the code you posted to validate as HTML 4.01 Transitional at http://validator.w3.org/

See the attached TXT file, save it as an HTML file and open it in a browser. Let us know if what I've done is what you're after.

[upl-file uuid=3a07244e-d298-429a-a4c5-a92fccde3e01 size=1kB]test.txt[/upl-file]
Copy linkTweet thisAlerts:
@chris9902authorNov 14.2003 — thanks for the help guys.

the code is alot better now and works in a couple of browsers i have tested it in and on Dreamweaver MX04's internal checker.

thank you?
×

Success!

Help @chris9902 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.25,
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,
)...