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?

1

3 Answers 3

3

Close the tag on the header-r div

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>
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.