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 13 of 13
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    Calgary, AB
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Different Size Screens and Different Resolution.

    Is there a script that changes the size of the page for the different resolutions of users and different screens sizes of users?

    For example I have a 19inch screen and the page fits perfectly on the screen,

    but when if I access it from a different computer I am not sure if it will fit or not, because when I restore my page and its not fully maximized the writting and pictures all overlap eachother.

    Is there a way to fix this?

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i listed a few methods in a poll in general web building and saisd that you could use % in CSS, make seperate pages, make a unique page which fits all. screen size problems really are up to you to decide upon
    photoshop too expensive? use the GIMP! www.gimp.org

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Location
    Calgary, AB
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay, in your poll, CSS was used the most. Where could I find more information on how to do that?

    Or could someone please tell me how to use "CSS" to adapt the webpage for different screen sizes!

  • #4
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    percents to size webpages

    Like whackaxe suggested, you can use CSS and percents. This allows the screen and resolution to be different and have the page conform to whatever. I have used something like this in the past:
    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" xml:lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>center</title>
    
    <style type="text/css">
    html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    }
    table {
    height: 100%;
    width: 100%;
    text-align: center;
    }
    </style>
    
    </head>
    <body>
    <table>
    <tr>
    <td>
    you can put your page in here using CSS layout and percents
    </td>
    </tr>
    </table>
    </body>
    </html>
    In this example, your page will be centered in the middle of the screen on any resolution or screen size.

    One more important thing to remember is to use all CSS to do the layout inside this... because you should not nest tables in XHTML.

    You can find tutorials on how to do layout with CSS in about 1000 places on the web, so just search around, and make sure to use percents instead of concrete untils like px. If you do this your page will be nicely centered for computers with big screens and resolutions, and it will contract to fit into a small screen with small resolution.

    If you can't figure out how this would work into your page, you may want to post a URL so we can take a look.

    Thanks to Graeme Hackston for helping me with this code on another project origionally also!

    -Doug
    Last edited by dauvm; 10-01-2002 at 02:59 AM.
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    No need to bloat code...It just takes longer to load. CSS isn't the end-all of styles...rather, just another tool with it's own set of problems.

    This will center your page regardless of resolution:

    <body>
    <table width="100%" height="100%">
    <tr><td align="center" valign="middle">

    your html code here

    </td></tr>
    </table>
    </body>

    (height is for NS I believe)
    Last edited by zoobie; 10-02-2002 at 11:12 PM.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #6
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by zoobie
    No need to bloat code...It just takes longer to load. CSS isn't the end-all of styles...rather, just another tool with it's own set of problems.

    This will center your page regardless of resolution:

    <body>
    <table width="100%" height="100%">
    <tr><td align="center" valign="middle">

    your html code here

    </td></tr>
    </table>
    </body>

    (height is for NS I believe)
    :: believes that
    body {
    width: 80%;
    margin: 0 auto;
    }

    is much shorter than that table code for centering page content ::

  • #7
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    however...

    Originally posted by zoobie
    No need to bloat code...It just takes longer to load. CSS isn't the end-all of styles...rather, just another tool with it's own set of problems.
    That is very true, zoobie, but it's important to remember that just because old-school HTML is ok now, in 3 or more years new XML browsers will not display this old code correctly. I think it's better to be forward-looking and future compatible... sometimes it's just necessary to write code how the internet gods dictate.

    In my opinion, everyone who wants to have their page still display relatively well within any amount of time should be writing well-formed XHTML.
    Code:
    <body>
    <table width="100%" height="100%">
    <tr><td align="center" valign="middle">
    
    your html code here 
    
    </td></tr>
    </table>
    </body>
    When you put this bit of code into an XHTML transitional document and attempt to verify, you will get this:
    Below are the results of checking this document for XML well-formedness and validity.

    Line 9, column 27:

    <table width="100%" height="100%">
    ^

    Error: there is no attribute "height" for this element (in this HTML version)
    You may be interested to know that not only is it not valid XHTML, it is not valid HTML 4.01 TRANSITIONAL! (the most loose of HTML DTDs)

    If anyone is interested in doing a little reading on where the internet is going and why everyting is getting standardized, I suggest these URLS.
    http://www.webstandards.org/
    http://www.w3.org/ (home of the internet gods)
    http://www.w3schools.com/ (great URL!)
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Originally posted by zoobie
    (height is for NS I believe)
    I find it hard to believe they'll change html...but whatever...

    Another point of standardization is selling power. Why use someone's program when they're all the same? This will probably never happen, realistically.
    Last edited by zoobie; 10-03-2002 at 03:02 AM.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #9
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, they may not change HTML persay, but they are changing the way that it can and is supposed to be written. It all ties into propriety and standardization, which is where I'll have to disagree with you, zoobie. I think that if you look at the history of computer, propriety always gives way to standardization. The success of Unix and ASCII over their many propriety predicessors are two very good examples... the recent exponential growth of Linux as a substitute for windows, especially for businesses and embedded software is another.
    Furthermore I think that both the viewers and writers of the internet want standards, and the actual coders writing the browsers want standards... it is only the high ups in the browser industry that are against it.

    Also as proof to me that browser companies are taking notice to the standards community is that, surprise, both microsoft and netscape have agreed not to add any more propriety code to web languages without going through the standardization process. It just never made sense for there to be two, often incompatible, versions of a language to be written for a single media... that's why it's changing.

    And that's my spiel

    -Doug
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #10
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by dauvm
    both microsoft and netscape have agreed not to add any more propriety code to web languages without going through the standardization process
    I wouldn't go as far as saying that. They've both begun supporting web standards to a usable amount, though Internet Explorer pales in comparison to the level of support found in Netscape 7.
    But Mozilla still adds proprietary interfaces from time to time, and MSDN is chock full of IE-only stuff.

  • #11
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Originally posted by dauvm
    both microsoft and netscape have agreed not to add any more propriety code to web languages without going through the standardization process
    Yer kiddin'...

    Yes...Of course WE, the users/pagemakers want standardization...but we don't make programs, etc. now, do we?All I'm saying is that proprietary programs shall always exist...
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #12
    Regular Coder
    Join Date
    Jun 2002
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    See this thread

    http://www.codingforums.com/showthre...?threadid=6502

    A few comments in there to add to the pot.
    Therapy is expensive, popping bubble wrap is cheap, you choose.

  • #13
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sorry, it took me a while to find this article again. I quote this direct from an article on xguru.com
    HTML was originally developed by Tim Berners-Lee. The original version of HTML was very bland - no colors, no sound, no multimedia. Black on grey. Netscape began adding something they called "Netscape Extensions" to HTML - new tags not supported by the official specification or other browser companies. When Microsoft entered the browser market, they added more tags of their own as a form of competitive advantage. Thus the term "embrace and extend" was born. Recently, both companies have announced they will no longer add tags not officially supported, and will instead go through the official specifications process. But the damage is already done. Browsers do the same things differently, or some tags and attributes are supported by one and not the other.
    so yea jkd and zoobie, it is true... I never said they would just forgot all their past propriety tags! like the article says, the damage is already done. I think this does go to show that some things are changing though.

    -Doug
    Last edited by dauvm; 10-03-2002 at 07:27 PM.
    "The focused mind can pierce through stone."
    - Japanese Maxim


  •  

    Posting Permissions

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