SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Thread: good web design

  1. #1
    SitePoint Zealot maileen's Avatar
    Join Date
    Apr 2006
    Posts
    158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question good web design

    Hi,

    i was wondering was is the best design for web site.
    basically, i was thinking to have:
    - a top header: where will be company logo, main menu, login, user name
    - a center part:
    - a left part: including sub menu
    - a center part: displaying information (dynamically)
    - a right part: including advertising, user information like basket content, and so on...
    - a bottom part: including only trademark, copyrights, policies, ...

    basically only the center part should change...therefore what should i use ?
    div ? span ?
    or a new web page each time ?
    frames are not anymore a standard according w3c...

    thx.

  2. #2
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should avoid any frames, JS (including AJAX) or others client-side technologies.

    You can do this like following:
    PHP Code:
    <?php

    $page 
    = isset($_GET['page']) ? $_GET['page'] : false//variable from address (...index.php?page=download

    switch($page){
      case 
    'download':
        
    $file 'download.html';
        break;
      case 
    'contact':
        
    $file 'contact.html';
        break;
      default: 
    //mainpage
        
    $file 'main.html';
        break;
    }

    $contents file_get_contents($file);

    ?><!DOCTYPE ...>
    <html ...>
      <head>
        ....
      </head>
      <body>
        ...
        <div id="content">
        <?php echo $contents?>
        </div>
        ...
      </body>
    </html>
    Of course there is many others ways to do that, but it's only example.

    If You want to have "nice URLs" read about mod_rewrite.

  3. #3
    SitePoint Wizard Blake Tallos's Avatar
    Join Date
    Jun 2008
    Location
    Cuyahoga Falls, Ohio.
    Posts
    1,510
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is a 3 column fixed layout. Is this what you were talking about?
    http://http://www.pmob.co.uk/temp/3colfixedtest_4.htm
    Blake Tallos - Software Engineer for Sanctuary
    Software Studio, Inc. C# - Fanatic!
    http://www.sancsoft.com/


  4. #4
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by maileen
    ...
    basically only the center part should change...therefore what should i use ?
    div ? span ?
    or a new web page each time ?
    frames are not anymore a standard according w3c...
    Serve a new page with the changed content in the center part div. The browser already has the images and external css and js, so the html is mainly what is refreshed.

    The other parts you listed sounds fine. Take a look at the examples BlakeAnthony linked to and you will find a good starting.

    The php example Crozin gave adds an extension for a nicer url. If serverside script is unavailable and the site has few departments the same is achieved with different directories as urls witch will load the index-file in that directory.
    Happy ADD/ADHD with Asperger's

  5. #5
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by maileen View Post
    Hi,

    i was wondering was is the best design for web site.
    basically, i was thinking to have:
    - a top header: where will be company logo, main menu, login, user name
    - a center part:
    - a left part: including sub menu
    - a center part: displaying information (dynamically)
    - a right part: including advertising, user information like basket content, and so on...
    - a bottom part: including only trademark, copyrights, policies, ...

    basically only the center part should change...therefore what should i use ?
    div ? span ?
    or a new web page each time ?
    frames are not anymore a standard according w3c...

    thx.
    I'd probably break it down like this:

    • Header (Logo, Login/Logout)
    • Search Form (it sounds like you have an ecommerce site, so give people the opportunity to search)
    • Main Menu (top level menu)
    • Sub-Menu (category menu)
    • Content (main page stuff - the meat and potatoes if you will)
    • Sidebar (advertising, shopping cart, etc)
    • Footer (typical footer content)


    When coded properly, it won't matter WHERE on the browser viewport the content appears; what will matter is how the site is coded. (And it's not as easy as tables vs DIVs either, since DIVs by themselves are just a train wreck as bad as layout tables.)

  6. #6
    SitePoint Zealot maileen's Avatar
    Join Date
    Apr 2006
    Posts
    158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    not really :-(

    Quote Originally Posted by BlakeAnthony View Post
    Here is a 3 column fixed layout. Is this what
    you were talking about?
    http://http://www.pmob.co.uk/temp/3colfixedtest_4.htm

  7. #7
    SitePoint Zealot maileen's Avatar
    Join Date
    Apr 2006
    Posts
    158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is something interesting because it's almost like in AJAX.
    however, if the content has to perform some storage into DB, how do you proceed ?
    1. do you run again this PHP page with another keyword (instead of 'download' for example)
    2. or do you allow 'content' to do something ? in this case how ?

    Quote Originally Posted by Crozin View Post
    You should avoid any frames, JS (including AJAX) or others client-side technologies.

    You can do this like following:
    PHP Code:
    <?php

    $page 
    = isset($_GET['page']) ? $_GET['page'] : false//variable from address (...index.php?page=download

    switch($page){
      case 
    'download':
        
    $file 'download.html';
        break;
      case 
    'contact':
        
    $file 'contact.html';
        break;
      default: 
    //mainpage
        
    $file 'main.html';
        break;
    }

    $contents file_get_contents($file);

    ?><!DOCTYPE ...>
    <html ...>
      <head>
        ....
      </head>
      <body>
        ...
        <div id="content">
        <?php echo $contents?>
        </div>
        ...
      </body>
    </html>
    Of course there is many others ways to do that, but it's only example.

    If You want to have "nice URLs" read about mod_rewrite.

  8. #8
    SitePoint Enthusiast webburu's Avatar
    Join Date
    Mar 2008
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use div for your design, it is flexible and easy to maintain but you have to test it with multiple browsers to make it works for almost of common ones such as IE firefox. Another easier way is to get the layout from several open source web design sites, just change some components and you're done, good luck!

  9. #9
    SitePoint Guru navyfalcon's Avatar
    Join Date
    Jul 2007
    Location
    So California, Los Angeles county, USA
    Posts
    719
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by webburu View Post
    Use div for your design, it is flexible and easy to maintain but you have to test it with multiple browsers to make it works for almost of common ones such as IE firefox. Another easier way is to get the layout from several open source web design sites, just change some components and you're done, good luck!
    To test use browser shots
    http://browsershots.org/
    Note: use only a few browsers at a time - or it will take too long to load
    Also, you can get free CSS templates and modify or edit them
    (a quick and easy way to go)
    There are quite a few thousand of them, do a Google search for free CSS templates
    Also you can get free public domain photos (check the use conditions)
    search for free public domain photos.
    hope this helps
    falcon
    Many good Free Tutorials at:
    http://freetutorials.name

  10. #10
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by maileen View Post
    this is something interesting because it's almost like in AJAX.
    however, if the content has to perform some storage into DB, how do you proceed ?
    1. do you run again this PHP page with another keyword (instead of 'download' for example)
    2. or do you allow 'content' to do something ? in this case how ?
    As in 1. It is reloading the whole page with new content, just as if it were a link to another page.
    Happy ADD/ADHD with Asperger's


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
  •