Results 1 to 5 of 5

 

Thread: Making page adapt to monitor resolution

  1. #1
    Registered User

    Status
    Offline
    Join Date
    Feb 2011
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts


    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.
    Coupon Site Script - Turnkey Affiliate Moneymaking Business

  2. #2
    Technophobe Geek

    Status
    Offline
    Join Date
    Jan 2005
    Location
    Cumbria, UK
    Posts
    805
    Thanks
    11
    Thanked 21 Times in 21 Posts
    Yeah tables will sort that out for you no probs.

    HTML Code:
    <table width="100%" border="0">
    <tr>
    <td width="80%">Left hand content goes here</td>
    <td width="20%">Right hand content goes here</td>
    </tr>
    </table>
    Much simpler than messing about with the CSS alternatives and finding it doesn't want to work properly on certain browsers etc.

    Trev

  3. #3
    Registered User

    Status
    Offline
    Join Date
    Feb 2011
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the help. Managed to resolve the problem with your help.
    Coupon Site Script - Turnkey Affiliate Moneymaking Business

  4. #4
    Steven-AS's Avatar
    Registered User

    Status
    Online
    Join Date
    Jun 2011
    Posts
    127
    Thanks
    5
    Thanked 12 Times in 11 Posts
    I know you've resolved your problem but if you were to go down a CSS route in the future the following should work just fine.

    Code:
    <style type="text/css">
      #content_main {clear:both;width:100%;min-width:900px;}
      #main_left_container {width:80%;float:left;}
      #main_right_content {width:20%;float:right;}
    </style>
    
    <div id="content_main">
      <div id="main_left_container">
        <div id="main_left_content">
          [left content goes here]
        <div>
      </div>
      <div id="main_right_container">
        <div id="main_right_content">
          [right content goes here]
        </div>
      </div>
    </div>
    It depends on what you intend to create within the two columns. In my personal opinion the CSS route provides greater flexibility.

  5. #5
    nick-harper's Avatar
    Registered User

    Status
    Online
    Join Date
    Feb 2011
    Posts
    91
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by Steven-AS View Post
    I know you've resolved your problem but if you were to go down a CSS route in the future the following should work just fine.

    Code:
    <style type="text/css">
      #content_main {clear:both;width:100%;min-width:900px;}
      #main_left_container {width:80%;float:left;}
      #main_right_content {width:20%;float:right;}
    </style>
    
    <div id="content_main">
      <div id="main_left_container">
        <div id="main_left_content">
          [left content goes here]
        <div>
      </div>
      <div id="main_right_container">
        <div id="main_right_content">
          [right content goes here]
        </div>
      </div>
    </div>
    It depends on what you intend to create within the two columns. In my personal opinion the CSS route provides greater flexibility.
    I have to agree, if you are just trying to figure out Web Design then learning CSS and CSS layouts is the best thing you could ever do



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2