tags:

views:

32

answers:

3

I need that this two divs look like one row of table , but thay don't show one beside other . Any help ?

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Info-Stanković Inženjering</title>

        <style type="text/css">
            div#wrapper{
                width:1004px;
                width:602px;
                margin-left: auto;
                margin-right: auto;
            }

            div#left{
                border-bottom: 1px solid #606060;
                border-left: 1px solid #606060;
                border-top:1px solid #606060;
                width:640px;
                height:600px;
                min-width: 640px;
                min-height: 600px;
            }

            div#right{
                border-bottom:  1px dashed #FF2A2A;
                border-left: 1px dashed #FF2A2A;
                border-right: 1px dashed #FF2A2A;
                border-top:1px dashed #FF2A2A;
                margin-left:643px;
                width:360px;
                min-width:360px;
                height: 600px;
                min-height: 600px;
                float:left;

            }


        </style>
    </head>
    <body>
        <div id="wrapper">
            <div id="left">

            </div>
            <div id="right">

            </div>
        </div>
    </body>
</html>
A: 

try setting overflow: auto on #wrapper

To find out why, look at the answers to my question here: http://stackoverflow.com/questions/3956645/why-does-setting-overflow-alter-layout-of-child-elements

bemace
Doesn't work. It add slider at bottom but divs still isn't in same row.
Rebecca
`#left` should also be `float: left`
bemace
A: 

The float:left should be on div#left not div#right

FutureKode
You can format inline code blocks by surrounding them with the backtick.
David Thomas
A: 

div#left still need "float:left", because div tag is a block element, it does not allow other element around it.

XIAOMING LI