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 4 of 4

Thread: Web Page Size

  1. #1
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Web Page Size

    Hi I'm Trying to set a Web Page to be able to View @ 480 and 272 , is so people can view it on PSP , Could you please show me some code on how to do this , I'm fairly new to HTML & CSS and could really use the help .........

  • #2
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    You can set the height and width on your body and html div's but you cannot influence the resolution set by the person viewing. They in turn are only able to use the resolution settings of their monitors.

    Why do you need to do this?

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #3
    New Coder
    Join Date
    Dec 2007
    Posts
    51
    Thanks
    1
    Thanked 1 Time in 1 Post
    Code:
    <html>
    
    <head>
    <style type="text/css">body {width:480px;}</style>
    </head>
    
    <body>
    
    Content Here
    
    </body>
    
    </html>
    The body will this fix itself to 480 pixels wide.

    You can't fix the height unless you put the content of the page inside one div, but making it a set height won't allow much room for content.

    Code:
    <html>
    
    <head>
    <style type="text/css">body {width:480px;}
    
    #Gwhole {width:480px; height:272px;}</style>
    </head>
    
    <body>
    
    <div id="Gwhole">
    Content Here</div>
    
    </body>
    
    </html>
    I'm not exactly sure of what you want. If you want a page viewable on the psp without scrolling left / right, but want users to scroll down/up, then use code 1.

    If you want a page viewable on the psp without scrolling AT ALL. Then use code 2.

    BUT, if you want people to view it from the psp AND the computer with the sizes increasing for computer, and then decreasing for psp. then you cannot. Sorry
    Last edited by Gilligan; 02-16-2008 at 05:32 PM.

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,930
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts
    It would be good if you showed us what you have so far.

    Now, I suppose a PSP goes through as handheld device, and hence it should render stylesheets declared as such. You can write different stylesheets for different devices and apply different sizes in each:

    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" lang="en-US" xml:lang="en-US">
    <head>
    <title>Website Title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="screen.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="print.css" type="text/css" media="print" />
    <link rel="stylesheet" href="handheld.css" type="text/css" media="handheld" />
    </head>
    <body>
    <div id="container">
    [your content here]
    </div>
    </body>
    </html>
    In screen.css you would write:
    Code:
    #container {width: 800px;}
    and in handheld.css you could write:
    Code:
    #container {width: 450px;}
    and it would be displayed accordingly in each device.


  •  

    Posting Permissions

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