1. Home
  2. windows
  3. Equal Height Columns In Css?

Equal Height Columns In Css?

By WinPie Posted in: windows

I need two columns in CSS (no javascript, no fake 1px image, etc) that are of equal height independently of their content, and they need to work both in Firefox and IE with a header and a footer.
So far so good, plenty of examples on the Web. But my problem is: I need the left column to be of fixed width (say, 150px), and the other column to occupy “the rest” of the screen independently of screen resolution.
Can this be done? If it can, please provide code examples, I’m a CSS newbie :)
Thank you!

Get Chitika Premium
  1. Ron Says

    Take a look at these CSS layouts that are free to use:http://www.code-sucks.com/css%20layouts/…
    Just pick the layout you want and modify the CSS for the colors and styles you want.
    Ron

  2. unknown Says
    column 1 row 1 column 2 row 1
    column 1 row 2 column 2 row 2

    add the above to html page and in the css write the following, that should change all with ids col1 and col2 to the attributes listed there:
    #col1 {
    width: 300px;
    background: #efefef;
    }
    #col2 {
    width: *;
    background: #red;
    }
    Well to change value of div, just put the id=”whatever” or class=”whatever” in the divs.
    it’ll be like the following in html

    Hello

    and following in css: (you set whatever layout you want there):
    #yourID {
    width: *;
    background: #red;
    }
    class is same as id, except if you put a id then search for something like yahoo.com#MyID
    it will search for the element with MyID as the id value, and go to that location

  3. Phil Says

Leave a Reply

You must be logged in to post a comment.

More Interesting Things

©2011 Windows Pie, All rights reserved.