Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

two div left right with auto width

Tags:

html

css

<div id="leftdiv" style="background: yellow; min-width: 400px; max-width: 800px;">left content left content left content</div>

<div id="rightdiv" style="background: red; width: 250px;">right content right content right content</div>

I put the float: left in the left div max-width and min-width not working. How can i fix this ?

like image 797
Kadir Çetintaş Avatar asked Jul 30 '26 23:07

Kadir Çetintaş


1 Answers

Float right div must be before left coz it gives trouble in some version of ie

<div id="rightdiv" >right content right content right content</div>
<div id="leftdiv">left content left content left content</div>

CSS same as bot

#leftdiv
{
    background-color:Yellow;
    min-width:100%;
    max-width:800px;
    float:left;
}

#rightdiv
{
    background-color:red;
    width:250px;
    float:right;
}
like image 182
user2389411 Avatar answered Aug 01 '26 14:08

user2389411



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!