Positioning one div to the right of another

Posted by Jonno_FTW on Stack Overflow See other posts from Stack Overflow or by Jonno_FTW
Published on 2010-03-12T07:37:12Z Indexed on 2010/03/12 7:47 UTC
Read the original article Hit count: 354

Filed under:
|
|

Hi

I have the following html and css. But what I can't figure out is how to have the tabs div at the right of the main div. So that they stick out the right like bookmarks.

.main {
    -moz-border-radius:10px;
    height: 75%;
    width: 60%;
    position: absolute;
    top: 15%;
    left: 20%;
    right: auto;
  }
.tabs {
    width: 50px;
    height: 1.3em;
    position: absolute;
    float: right;
}
 #tab { margin: 10px 10px 10px 0px;}

And the html:

   <div class="main">
         <div id="content">
            Some main content
         </div>
      </div>
       <div class="tabs">
          <div class="tabs" id="tab">
             <a href="#" alt="Home">
                Home
             </a>
          </div>
          <div class="tabs" id="tab">
             <a href="#" alt="About">
                About
             </a>
          </div>

© Stack Overflow or respective owner

Related posts about html

Related posts about css