Submit Your Article
Home Articles News Tutorials Videos Add An Article
Topics: Design Photoshop Programming PHP CSS Java Database Web Development Javascript Ajax
– Close + Open

Find Out More About DevWebPro!

Sign up for the newsletter


» Terms & Conditions

Welcome to the New DevWebPro!

DevWebPro Includes:
  Hundreds Of Tutorials   Developer News
  Unique Gadget Videos   Tons of Topics to Discuss
  Expert Advice   We Will Publish Your Articles

CSS Fluid layout tutorial

By: Kasted
Thursday, January 4th, 2007
Text: Decrease Font Size Increase Font Size | Print Print Article | Share: Delicious Digg StumbleUpon Post to Twitter Post to Facebook

Knowing how to make a fluid layout using CSS is something that every web developer should learn, and it is very easy to do with these easy steps. In this tutorial we will create a 100% fluid layout, which means that everything on the site can resize to fit 100% of the browser window from 800×600 resolution to 1920×1080 the site is 100% of the browser window, no space will be wasted! Okay lets get started…

First off we’ll show off our layout, which is a very very simple template which can be easily converted with a couple lines of CSS to fit your layout.

large-res-example.jpg

For the example I show the site in the resolution 1650×1080 at max browser width.

Now that we know about fluid layouts and how theres an advantage to them lets start off with our CSS code, which would be the file ’style.css’. There are multiple comments in the CSS to help explain why those attributes were used, and how they work.

Now that we have our CSS for the layout lets get our HTML to complete the layout.

As you may notice, we use the @import function to include the CSS onto the file, personally I think that it is easier for you to use @import, but some do not, you can also use:

Checkout the example site here, and click here to download all the files used in this tutorial!

Please Note: This is a modification of DynamicDrives Liquid Layouts.

Topics: , ,

About the Author:

Leave a Comment

DevWebPro is an iEntry Network ® publication - © 1998-2010 All Rights Reserved