Css Gradient Background HELP!!!!

A

Anonymous

Guest
Hi,

When i put a gradient background on my page using css it starts half way down the page, any ideas??

Heres the code
Code:
/* --( OUTLINE )-- */
body
{ background:url('images/background.png') 0 bottom repeat-x #FFF;
  margin: 0 }

#top
{ width:960px;
  margin:0 auto;
  padding: 0;
  background:url('images/top_bg.png') repeat-x;
  height:23px; }
  
#top div
{ font:8pt Tahoma, Arial, Helvetica; 
  color:#aaa }
  
#top a
{ color: #aaa;
  text-decoration: none }

#top a:hover
{ color: #fff; }

#topl
{ float:left; width:720px; padding:3px 10px }

#topm
{ float:left; width:50px }

#topr
{ float:left; width:150px; text-align:right }
  
#top_banner
{ width:940px;
  margin:auto;
  padding:10px;
  background:url('images/top_banner_bg.png') repeat-x;
  height:65px;
  font:8pt Arial, Helvetica;
  color:#aaa }

#top_bannerl
{ width:300px; float:left }

#top_bannerr
{ width:600px; float:right }
  
#top_menu
{ width:960px;
  margin:auto;
  background:url('images/menu_bg.png') repeat-x;   }
  
#top_menu td
{ background:url('images/menubg_0.png') right top no-repeat; }

#top_menu td:hover
{ background:url('images/menubg_1.png') right top no-repeat; }

#top_menu td a
{ font-size::11pt;
  color:#555;
  text-decoration: none;
  padding:0 15px}
  
#body
{ width:960px;
  margin:16px auto 0 auto;
  background:url('images/body_bg.png') 0 0 repeat-y; }
  
#bodyl
{ width:200px; float:left }

#bodyr
{ float:left; width:720px; padding:0 10px }

#footer
{ height:133px;
  margin-top:20px;
  padding: 6px;
  width:948px;
  margin:auto;
  background:url('images/body_bottom.png') 0 0 no-repeat; }

#footerl
{ width:180px; border-right: solid 1px #bdbdbd; text-align:center; float:left }

#footerm
{ width:680px; float:left; margin-left:20px; font-size:8pt;}

#footerr
{ width:60px; float:left }

.copyright
{ margin-top:10px }

.qbanner
{ margin-top:10px; }

input.search
{ background:url('images/top_search.png') 0 0 no-repeat;
  font: 9pt Arial, Helvetica;
  width:97px;
  height:19px;
  border:none;
  padding:2px 35px 0 25px;
  margin:0;}

button.login
{ background:url('images/button_bg.png') 0 0 no-repeat;
  padding:0;
  margin:0;
  margin-top:1px;
  border:none;
  width:50px;
  height:20px;}

ul.curr_link
{ margin: 0;
  padding: 0;
  list-style: none }

ul.curr_link li
{ margin-left: 0;
  margin-top:2px  }

ul.curr_link li a
{ text-decoration:underline }

ul.curr_link li a:hover
{ text-decoration:none }
	
/* --( category browser )-- */
/* 1. Drill Down */
.category
{ font: 9pt Arial, Helvetica;
  line-height: 1.76;
  color: #333;
  padding: 0 0 5px 13px;
  text-decoration: none; }
  
.category:hover
{  }

.sub_category
{ font: 9pt Arial, Helvetica;
  color: #333;
  padding-left: 30px;
  line-height: 1.76; 
  text-decoration: none; }

.cur_category
{ font: bold 9pt Arial, Helvetica;
  color: #000;
  padding-left: 30px;
  line-height: 1.76; 
  text-decoration: none; }

.active
{ padding:10px;
  margin-bottom:20px }

.news_separator
{ margin-bottom:10px; } 

.page_separator
{ margin-bottom:24px; } 

.subscribe
{ margin:24px auto;
  width: 380px; }
 

/* 2. Tree View */
.category_browser
{ margin:0 0 0 5px; padding: 0}
.category_browser ul{ /*CSS for Simple Tree Menu*/
margin: 0px;
padding: 0;
}

.category_browser li{ /*Style for LI elements in general (excludes an LI that contains sub lists)*/
background: white url('../_common/images/list.gif') no-repeat left center;
list-style: none;
padding-left: 22px;
margin-bottom: 3px;
}

.category_browser li.submenu{ /* Style for LI that contains sub lists (other ULs). */
background: white url('../_common/images/closed.gif') no-repeat left 1px;
cursor: hand !important;
cursor: pointer !important;
}

.category_browser li.submenu ul{ /*Style for ULs that are children of LIs (submenu) */
display: none; /*Hide them by default. Don't delete. */
}

.category_browser .submenu ul li{ /*Style for LIs of ULs that are children of LIs (submenu) */
cursor: default;
}
/* --( end of browser )-- */ 

/* --( WELCOME )-- */
.title
{ padding: 5px 0;
  font-weight: bold;
  margin-bottom: 20px;
  font-family: Helvetica, Arial, Sans-Serif;
  font-size: 18px;
  color:#666666;
  letter-spacing:-1px; }

.discount
{ font: italic 8pt Georgia, Times; 
  color: darkgray; 
  font-weight: bolder }

/* --( LIST )-- */
.listtitle
{ font-size: 8pt; 
  font-weight:bold; 
  text-decoration:none }

.listtitle:hover
{ text-decoration:none }


/* --( DETAIL )-- */
.toolbox
{ font: 8pt Arial, Helvetica; }

.toolbox a
{ border-bottom: solid 2px white }

.toolbox a:hover
{ border-bottom: solid 2px black }

.detailtitle
{ font-size:14pt; 
  font-weight:bold; }

.detailsect
{ font-size:10pt; 
  font-weight:bold; 
  color: #777777; }

/* --( CHECKOUT )-- */
.payselect_box
{ background-color: navy; 
  width: 100%; 
  height: 50px; 
  border: outset; 
  float: left; 
  text-align: center; 
  font-size: 16pt;
  text-decoration: none }

.checkoutjdl
{ font-family: Trebuchet MS, Verdana,Arial,Helvetica; font-size:10pt; font-weight: bold; color: white }

.checkoutspk
{ font-family: Trebuchet MS, Verdana,Arial,Helvetica; font-size:8pt; }

.checkouttxt
{ font-family: Trebuchet MS, Verdana,Arial,Helvetica; font-size:10pt; }

.checkoutdel
{ color: #FF0000; font-weight:bold; text-decoration:none; }

/* --( Modules )-- */
.module_lr
{ width:160px;
  border:solid 1px #bbb; 
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  margin-bottom: 30px}

.module_lr legend
{ font-weight:bold;  }

.module_lr .content
{ padding:0px; }


Thanks in advance :help: :help:
 
I think it's because you have set it to bottom

Code:
body
{ background:url('images/background.png') 0 bottom repeat-x #FFF;
  margin: 0 }

try setting it to top (if you wish top lace it there)

Code:
body
{ background:url('images/background.png') 0 top repeat-x #FFF;
  margin: 0 }
 
Better yet, if you just need a simple gradient use the css linear-gradient property to apply it without any image at all! There's even an IE-friendly transform version if you're not doing anything complicated. Those repeating images are no longer needed.
 
imjoshcaleb said:
Here just use this, quick and easy
8)
http://www.colorzilla.com/gradient-editor/
I still prefer to used repeated images for backgrounds, that way I don't have to worry about what browser support it.
 
Back
Top