Closed Thread
Results 1 to 3 of 3

Thread: Div-CSS Template - Help?

  1. #1
    Momotaro is offline Newbie
    Join Date
    Jun 2009
    Posts
    7
    Rep Power
    0

    Div-CSS Template - Help?

    I'm in the process of refining my website template, which uses the <div> tag for different sections of the page, including a sidebar, and main part. I was wondering, does anyone have code to make those two match up in terms of height, without cutting of content, and not making them a fixed height? I've checked them on Firefox 3, IE 8, and Safari 4. They look mostly the same.

    Code can be found at majhost.com/gallery/Ultimate-Collector/stuff/div-css_template.txt

    Thanks!

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    NatalieM's Avatar
    NatalieM is offline Learning Programmer
    Join Date
    Jun 2009
    Location
    London, England
    Posts
    83
    Rep Power
    10

    Re: Div-CSS Template - Help?

    I think you could do it if you use the same containing block for them both and then use height = "100%"..

    For example, change your HTML to

    HTML Code:
    <div id="the_maincontentandsidebarsection">
        <div id="the_maincontents">
            contents
        </div>
        <div id="thesidebar">
            sidebar
        </div>
    </div>
    And then for your CSS

    Code:
    div#the_maincontents, div#thesidebar {
    height: 100%;
    }
    
    div#the_maincontents, div#thesidebar , div#the_maincontentandsidebarsection {
    float: left;
    }
    
    div#the_maincontents, div#the_maincontentandsidebarsection {
    clear: left;
    }
    I'm not 100% sure it would work but worth a try I reckon

  4. #3
    Momotaro is offline Newbie
    Join Date
    Jun 2009
    Posts
    7
    Rep Power
    0

    Re: Div-CSS Template - Help?

    It didn't work in Internet Explorer, but it did in Firefox and Safari. But, it extended all the way down! How can I get it to fit the content? Thanks anyway though.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. php in template?
    By Hamed in forum PHP Development
    Replies: 2
    Last Post: 12-10-2010, 08:18 PM
  2. What template should I use?
    By nicckk in forum Website Design
    Replies: 22
    Last Post: 04-11-2009, 10:14 PM
  3. New template
    By Jaan in forum Website Design
    Replies: 20
    Last Post: 10-30-2008, 11:44 AM
  4. asp.net template help
    By streulich in forum ASP, ASP.NET and Coldfusion
    Replies: 4
    Last Post: 12-01-2006, 05:55 PM

Tags for this Thread

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