1

I have 2 nested divs as

 <div id="header">
   <div id="logo"></div>
   <div id="header_r"></div>
 </div>

The css is

 #header{
      border: 1px solid;
  width: 900px;
  border-radius: 10px;
  min-height: 100px;
  }     
#logo{
    border: 1px solid;
width: 400px;
border-radius: 10px;
min-height: 80px;
float: left;
 }
  #header_r{
    border: 1px solid;
width: 500px;
border-radius: 10px;
min-height: 80px;
float: left;
 }

It gets arranged one below the other. How do I get them side by side?

user544079
  • 16,109
  • 42
  • 115
  • 171

3 Answers3

3

Close the tag on the header-r div

Jarrett Widman
  • 6,329
  • 4
  • 23
  • 32
2

You need to close the tag on the "header_r" div

<div id="header">
   <div id="logo"></div>
   <div id="header_r"></div>
 </div>
locoboy
  • 38,002
  • 70
  • 184
  • 260
1

Reduce width for logo and header_r by 2px each because border is also included in width of an element.

Mahima
  • 489
  • 1
  • 5
  • 17