View Full Version : div background position (urgent)

02-24-2011, 05:08 AM
I'm try to position the background on the #logofix div properly to no success.

I'm using this (http://stereo.wired.x10.mx/jeniituhll/cache1.png) as the background and I can't position it properly. Its supposed to background on the 85th vertical pixel on the url img I just gave. help please

02-24-2011, 07:25 PM
IF I understand you properly, this seems to easy to be real. The whole of the image you posted, will not fit, try slicing the top of it or adust your width.

02-24-2011, 07:50 PM
Hello nolvorite,
Are you trying to use that image like a sprite? It's a crazy big image for just that 338 x 85 button but try it like this -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body {
margin: 0;
background: #FC6;
#container {
width: 800px;
margin: 30px auto;
padding: 50px;
background: #999;
#logofix {
height: 85px;
width: 338px;
background: url(http://stereo.wired.x10.mx/jeniituhll/cache1.png) 0 -85px;
<div id="container">
<div id="logofix"></div>
<!--end container--></div>