how to control div size when other divs are changing [duplicate]


Tags: asp.net,html,css

Problem :

Possible Duplicate:
CSS - Equal Height Columns?

I'm not the greatest with css, so my page layout looks like this:

<div style="width:80%;border:1px solid #000;">
    <div style="float:left; width:33.3%; background:#aaa;">one</div>
    <div style="float:left; width:33.3%; background:#bbb;">two</div>
    <div style="float:left; width:33.4%; background:#ccc;">three</div>
    <div style="clear:both;"></div>
</div>

div one has the side links and image

div two holds the main content

div tree has some ads div

now when the main content increases in size the other two stay the same height, so how do I get the height for all 3 divs to increase??



Solution :

I used this recently for one of my websites.

http://matthewjamestaylor.com/blog/equal-height-columns-cross-browser-css-no-hacks

This worked great for me. you may have to reverse engineer the code a little to get your columns to the right widths for you.


    CSS Howto..

    How to overlay shadow with bootstrap?

    How to make a DIV section clickable?

    How to add an orange background to top of page

    How to change an image in CSS that has no class?

    How to overlay/overlap two div's designed with css to look like text bubbles?

    How can I add a custom HTML map marker to a Nokia HERE map?

    How to properly apply WinJS.Binding.Template ListView GridLayout CSS?

    how to deal with repeated letters in a javascript hangman game

    How to handle this CSS issue with Wordpress?

    How to create css code that works for all browser?

    How to make background-image size height always equal what the image height needs to be for full width image?

    How to add table highlighting in PHP?

    How to style td with input button and text-size button?

    When i Check the Checkbox how do I change that specific row style? C# ASP.NET

    How to make sure my css overlay is on top at any site?

    How to assign custom CSS to Sharepoint site

    How can I make an image carousel with only CSS?

    How to hide second row of a table using css?

    CSS, how to add picture in the corner of every columns

    How to fade out text on top of semi-transparent div using CSS?

    How do I switch my CSS stylesheet using jQuery?

    How to segregate these divs with 'position:absolute' into different groups?

    How to have css hover effect affect child elements differently?

    How to add non-literal into a variable like jQuery?

    How to convert html & css to an image?

    How to apply !important using .css()?

    How to Set Up a Responsive Background-Image with CSS

    How do I style hyperlinks separately, using CSS?

    Unsure of how to wrangle my javascript dependencies

    How to convert 2 css files into one swf file in flex 4.11 SDK