View Full Version : divs and backgrounds


swtycathy
02-04-2003, 07:42 PM
can someone PLEASE tell me what the heck is wrong with my html> it looks wright to me but when i load the page, the background doesn't load. i want it fixed also. before i changed the htmling around, the background showed but the background wasn't fixed and for some reason it wouldn't become fixed at all here's the html:



<html><STYLE type="text/css">
<!--
Body {background-color: #fefefe; text-align: justify; font-family:Arial; color: #000000; font-size: 9pt}
P {font-family:Arial; color: #000000; font-size: 9pt}
TD {font-family:Arial; color: #000000; font-size: 9pt}
TH {font-family:Arial; color: #000000; font-size: 9pt}
.standard {font-family:Arial; color: #000000; font-size: 9pt}
.standardsmall {font-family:Arial; color: #000000; font-size: 9pt}
.linksmall {font-size: 9pt}
A:link {font-family:Arial; color: #000000; font-size: 9pt; text-decoration: none}
A:visited {font-family:Arial; color: #000000; font-size: 9pt; text-decoration: none}
A:active {font-family:Arial; color: #000000; font-size: 9pt; text-decoration: none}
A:hover{ text-decoration: overline; color:#000000}
.searchbarborder {background-color: #transparent;
margin-top: ; visibility: hidden}
.searchbarinterior {background-color: transparent; visibility: hidden}
.leftmoduletitlebar {visibility: hidden; text -align: center; border:0 ; text-align: justify}
.leftmoduleborder {background-color: transparent; border=0 #ABBE98}
.leftmoduleinterior {background-color: transparent; border=0}
.leftmodulefontcolor {font-family: arial; color: #000000; font-size: 9pt}
.leftmoduletitlefontcolor {font-family: arial; color: #000000; font-size: 9pt}
.leftmodulefontcolorsmall {font-family: arial; color: #000000; font-size: 9pt}
.leftmoduletitlefontcolorsmall {font-family: arial; color: #000000; font-size: 9pt}
HR {color: #fefefe}
.leftmodulehr {color: transparent}
.pagewidth {width: 100%}
.align {text-align: justify}
body { scrollbar-face-color : #fefefe;
scrollbar-shadow-color : #fefefe;
scrollbar-highlight-color : #fefefe;
scrollbar-3dlight-color : #fefefe;
scrollbar-darkshadow-color: #fefefe;
scrollbar-track-color : #fefefe;
scrollbar-arrow-color : #ABBE98}
BODY {border-style: solid ; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-color: #000000}
}
-->
</STYLE>
<div id="scroll" style="position:static;
width:800;
height:500;
overflow:auto;
border-color:000000;
border:solid;
border-top-width:1px;
border-right-width:1px;
border-bottom-width:1px;
border-left-width:1px;
align="center";
background-image:(http://i.xanga.com/picturesforme/layout%202.jpg);
background-attachment: fixed;>
<BODY BGCOLOR="#fefefe">
<CENTER><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%" bordercolor="#798b7e">
<script language=javascript>
document.title=("`but i'm on fire.")
</script><body><center><span><STYLE type="text/css">
<!-- .searchbarborder {
background-color: #fefefe; margin-top: -65px;visibility: hidden}
.searchbarinterior {
background-color: transparent;visibility: hidden}
.table.textad {
background-color: transparent;
visibility: hidden; margin-top: -85px;}
table.banner {
background-color: transparent;
visibility: hidden; margin-top: -80px;}-->
</STYLE></html>

epolady
02-04-2003, 07:54 PM
i saw quite a few errors. All CSS goes in the <head> you don't have a <head>, it's align : center. The background should be like so

background-image:url(http://i.xanga.com/picturesforme/layout%202.jpg);

your div is incomplete because you missed an ending Quote on this line

background-attachment: fixed;

and you didn't end the DIV with </div>

You should group all of your CSS together. You have 2 <body>s

swtycathy
02-04-2003, 08:30 PM
oh thanks a lot i'll go try it now :)

swtycathy
02-04-2003, 08:53 PM
hmm now it makes it look like a banner and not a background.. and my div doesn't seem to work now. now it just looks like a normal page without much html unto it

epolady
02-04-2003, 09:34 PM
Are you trying to get your text/content/etc in the lil box of the image?

swtycathy
02-04-2003, 10:14 PM
yea.. how can i do that?

epolady
02-04-2003, 10:37 PM
Something like THIS (http://epo.250free.com/blah.html)?

You'll have to play around with the absolute positioning, but it gives the effect of an iframe. Hope this is what you wanted.

I cleaned up your code a bit, hope you don't mind.

swtycathy
02-06-2003, 01:44 AM
yea =) thanks i'm gunna go and try it now.. hope it works!