SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Non-Member
    Join Date
    Nov 2010
    Posts
    174
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Making page adapt to monitor resolution

    I have a to make web page containing 2 columns. This is done.
    Now what I would like to insert in the code is something like this:
    The 2 columns should be full screen on any resolutions. Something like the page would adapt to the monitor resolution.
    The percent would be 80% for the first column 20% for the second one.

    What I don't know - is how to do that. Would a table resolve this problem?
    What would be the code for this?

    Suggestion are well appreciated.

  2. #2
    SitePoint Zealot Cute Tink's Avatar
    Join Date
    Apr 2009
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A table would work fine, or CSS.

    With plain HTML, that would be <table><tr><td width="80%"></td><td width="20%"></td></tr></table>

    CSS coding would be style="width: 80%;" within the object or slightly different in the style sheet: width: 80%; CSS width property

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Using HTML and CSS you can only make it fill 100% of the browser viewport. If you want it to fill 100% of the screen resolution and have scrollbars so that your visitor can scroll to see the parts that don't fit within the browser viewport (due to the browser itself, any fixed toolbars on the screen, or simply because the person doesn't have their browser maximized) then you'd need to use JavaScript to set the size.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    Non-Member
    Join Date
    Nov 2010
    Posts
    174
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Managed to make the work done with your help. Thank you.


Bookmarks

Posting Permissions

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