Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

NickFalk

macrumors 6502
Original poster
Jun 9, 2004
347
1
Hi there. I'm finishing up my latest game Squid Drop today (hopefully). As part of the package I have a UIWebView linking to a php-document. My problem is that I seem unable to scale the background-image correctly. It's a fairly small sized jpg with the dimensions 640x960.

In my mind this should easily scale the image to fill the display but I haven't dabbled with css for quite some time, and was never a wiz at it to begin with. Anyone?

Code:
<?php
mb_internal_encoding("UTF-8");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="no" lang="no">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Squid Drop More</title>

<style type="text/css">
  body {
    color: purple;
    background-color: #d8da3d; 
    background-image:url('moreSquidDropBackground.jpg');
    font-family:"Helvetica", Arial, sans-serif;
    background-repeat:no-repeat;
    background-attachment:fixed;


    width: 320px;
    
}


div{
width: 320px;


}

  </style>

</head>



<body>
   
            <div class="h2">
                 <h2>
	                   Newsletter signup
	              </h2>
	                         
           
               <h4>
               Stay informed / Win future games
               </h4>
               
          </div>
          
    </body>
</html>

Direct link.
 
Hm

I actually don't see the problem. If you figure it out and finish the app reply with a link and I would love to do a review about it on my website. Thanks.
 
you can only scale a background image on css3 if that's what you're trying to accomplish.

background-size: <bg-size> [ , <bg-size> ]*
<bg-size> = [ <length> | <percentage> | auto ]{1,2} | cover | contain
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.