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 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2007
    Location
    montreal quebec canada
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help on Body Code

    Hi there,

    I was wondering if anyone can help me with an issue im facing
    i am creating a website and would like the page to load to fit to size, so if the user has 800X600 the page will get smaller to fit to his browser settings, or display settings.... ?

    anyone have a script or setting that i can use or put in the html code ?

    Thx

    Elaine

  • #2
    New Coder
    Join Date
    May 2007
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This isn't a Java issue. What you're asking can be done with CSS using width: x%; or width: xem; type stuff. Try reposting it there.

  • #3
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    CSS code:
    Code:
    body
    {
    width:100%;
    }
    HTH
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    No multiple posts!

    Please DO NOT repost a thread in another forum; if the forum a thread is posted in is not fitting, a moderator can move it to an appropriate one.
    Posting the same or similar threads in multiple forums is not allowed.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #5
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by whizard View Post
    CSS code:
    Code:
    body
    {
    width:100%;
    }
    Hmm... I'm not sure that would make much difference. Basically, this would be the same as not specifying any width (if we don't have any margin/padding/border for the body element).

    A fluid layout will automatically fit to the width of the window. If you want a fixed-width-layout with width dependent on screen resolution, then you would need JavaScript for detection of client-side properties.


  •  

    Posting Permissions

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