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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Oct 2005
    Posts
    336
    Thanks
    43
    Thanked 2 Times in 2 Posts

    How to switch from Fluid to Fixed style and vise versa.

    I am designing my own webpage with css as a hobby and so far I have the structural layout pretty much as I want it to be. It is a fluid style taking up all the space of the browsers width.

    I recently decided (just for fun) to do a fixed 750px width version of my page by adding a fixed width wrapper div of 750px around it.

    Both look fine, but I have now got two sets of html index.html files and two sets of external css files for each fixed and fluid page.

    I want to know can I use just one html file for both pages? Do I need to switch between fixed and fluid style sheets?

    I also want have removed a html element from the fixed page as it does not look right on the fixed page. Can I hide any html from one page and show it on another? I dont want to have to keep updating both sets of html and css files when I make an alteration on one page - as it means I have to do the same on the other - if you get my drift! Here are the pages -

    Fluid - www.siteoftom.com/index.shtml
    Fixed - www.siteoftom.com/700wide/700wide.shtml

  • #2
    Regular Coder
    Join Date
    Feb 2007
    Location
    Canada
    Posts
    924
    Thanks
    10
    Thanked 56 Times in 55 Posts
    That is the power of CSS. One html file, properly done, can be switched, moved, twisted and otherwise re-designed simply by altering the css file.

    Check this page:
    http://blog.html.it/layoutgala/

  • #3
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,274
    Thanks
    28
    Thanked 271 Times in 265 Posts
    Quote Originally Posted by moss2076 View Post
    I want to know can I use just one html file for both pages? Do I need to switch between fixed and fluid style sheets?
    Using scripting to create and remove a class attribute would be one method of altering the layout without the need for HTML duplication. See http://www.jsgp.us/demos/dic22227.html for an example.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • Users who have thanked Arbitrator for this post:

    jlhaslip (10-30-2007)

  • #4
    Regular Coder
    Join Date
    Feb 2007
    Location
    Canada
    Posts
    924
    Thanks
    10
    Thanked 56 Times in 55 Posts
    Quite nice. Thank you for the posting.


  •  

    Posting Permissions

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