Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder nolvorite's Avatar
    Join Date
    Dec 2006
    Posts
    176
    Thanks
    7
    Thanked 0 Times in 0 Posts

    div background position (urgent)

    I'm try to position the background on the #logofix div properly to no success.
    http://stereo.wired.x10.mx/jeniituhll/index.html

    I'm using this 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

  • #2
    Regular Coder
    Join Date
    May 2009
    Posts
    813
    Thanks
    123
    Thanked 24 Times in 24 Posts
    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.

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,678
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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 -
    Code:
    <!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">
    <head>
    <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;
    }
    </style>
    </head>
    <body>
        <div id="container">
        	<div id="logofix"></div>
        <!--end container--></div>
    </body>
    </html>
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •