...

View Full Version : How to switch from Fluid to Fixed style and vise versa.



moss2076
10-30-2007, 06:20 AM
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

jlhaslip
10-30-2007, 06:52 AM
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/

Arbitrator
10-30-2007, 01:01 PM
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.

jlhaslip
10-30-2007, 08:52 PM
Quite nice. Thank you for the posting.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum