Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8779995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:56:03+00:00 2026-06-13T19:56:03+00:00

I have a number of divs inside another div trying to make a bbokshelf.

  • 0

I have a number of divs inside another div trying to make a “bbokshelf”. In order to align the “books” divs bottom, I’m using the display:table-cell css property, and the cointainer width at 100%, but when the inside divs fills the container, they start overflowing. Is there a way to make them appear in rows, like floating them or something? float: left did not work.
The HTML:

<div class="magazinebookcase">
    <div class="books">
    <a style="height:286px;width:16px;" href="">
            <div class="rotate">Book 9</div>
    </a>
    </div>
            <div class="books">
    <a style="height:258px;width:48px;" href="">
            <div class="rotate">Book 10</div>
    </a>
    </div>
            <div class="books">
    <a style="height:252px;width:38px;" href="">
            <div class="rotate">Book 11</div>
    </a>
    </div>
            <div class="books">
    <a style="height:254px;width:34px;" href="">
            <div class="rotate">Book 12</div>
    </a>
    </div>
            <div class="books">
    <a style="height:258px;width:36px;" href="">
            <div class="rotate">Book 13</div>
    </a>
    </div>
            <div class="books">
    <a style="height:258px;width:50px;" href="">
            <div class="rotate">Book 14</div>
    </a>
    </div>
            <div class="books">
    <a style="height:254px;width:52px;" href="">
            <div class="rotate">Book 15</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:72px;" href="">
            <div class="rotate">Book 16</div>
    </a>
    </div>
            <div class="books">
    <a style="height:258px;width:38px;" href="">
            <div class="rotate">Book 17</div>
    </a>
    </div>
            <div class="books">
    <a style="height:252px;width:40px;" href="">
            <div class="rotate">Book 18</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:46px;" href="">
            <div class="rotate">Book 19</div>
    </a>
    </div>
            <div class="books">
    <a style="height:284px;width:14px;" href="">
            <div class="rotate">Book 20</div>
    </a>
    </div>
            <div class="books">
    <a style="height:252px;width:42px;" href="">
            <div class="rotate">Book 21</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:44px;" href="">
            <div class="rotate">Book 22</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:44px;" href="">
            <div class="rotate">Book 23</div>
    </a>
    </div>
            <div class="books">
    <a style="height:262px;width:60px;" href="">
            <div class="rotate">Book 24</div>
    </a>
    </div>
            <div class="books">
    <a style="height:284px;width:14px;" href="">
            <div class="rotate">Book 25</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:40px;" href="">
            <div class="rotate">Book 26</div>
    </a>
    </div>
            <div class="books">
    <a style="height:254px;width:58px;" href="">
            <div class="rotate">Book 27</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:40px;" href="">
            <div class="rotate">Book 28</div>
    </a>
    </div>
            <div class="books">
    <a style="height:257px;width:41px;" href="">
            <div class="rotate">Book 29</div>
    </a>
    </div>
            <div class="books">
    <a style="height:258px;width:40px;" href="">
            <div class="rotate">Book 30</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:34px;" href="">
            <div class="rotate">Book 31</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:42px;" href="">
            <div class="rotate">Book 32</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:44px;" href="">
            <div class="rotate">Book 33</div>
    </a>
    </div>
            <div class="books">
    <a style="height:254px;width:40px;" href="">
            <div class="rotate">Book 34</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:40px;" href="">
            <div class="rotate">Book 35</div>
    </a>
    </div>
            <div class="books">
    <a style="height:252px;width:42px;" href="">
            <div class="rotate">Book 36</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:44px;" href="">
            <div class="rotate">Book 37</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:34px;" href="">
            <div class="rotate">Book 38</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:36px;" href="">
            <div class="rotate">Book 39</div>
    </a>
    </div>
            <div class="books">
    <a style="height:252px;width:26px;" href="">
            <div class="rotate">Book 40</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:34px;" href="">
            <div class="rotate">Book 41</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:50px;" href="">
            <div class="rotate">Book 42</div>
    </a>
    </div>
            <div class="books">
    <a style="height:258px;width:48px;" href="">
            <div class="rotate">Book 43</div>
    </a>
    </div>
            <div class="books">
    <a style="height:258px;width:46px;" href="">
            <div class="rotate">Book 44</div>
    </a>
    </div>
            <div class="books">
    <a style="height:256px;width:60px;" href="">
            <div class="rotate">Book 45</div>
    </a>
    </div>
        <div class="clearfix"></div>
</div>​

The CSS:

.magazinebookcase {
width: 100%;
padding: 3px;
float:left;
} 

.magazinebookcase .clearfix {
clear:both;
}

.magazinebookcase .books {
display: table-cell;
vertical-align: bottom;
text-align:center;
}

.magazinebookcase a {
border: 1px solid #000;
display: block;
font-size: 0.7em;
}

.magazinebookcase a:hover {
background-color: #ccc;
}

.rotate {
-moz-transform: rotate(270deg);
-moz-transform-origin: 50% 50%;
-webkit-transform: rotate(270deg);
-webkit-transform-origin: 50% 50%;
position: relative;
top: 50%;
}​

http://jsfiddle.net/b8K7u/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:56:05+00:00Added an answer on June 13, 2026 at 7:56 pm

    Instead of display: table-cell; try display: inline-block;

    like so.

    .magazinebookcase .books {
    display: inline-block;
    vertical-align: bottom;
    text-align:center;
    }
    

    http://jsfiddle.net/b8K7u/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that dynamically generates any number of divs.  Inside the div
Using jQuery 1.6.2 I have a variable number of floated divs inside a parent.
I have an ASP.NET repeater, which contains 3 divs inside the ItemTemplate. Each div,
I have four divs contained in another div, and I want the four inner
In my HTML there are number of divs each having names inside. I have
I have a php script that is generating an unspecified number of divs inside
I have a parent div inside which I have multiple divs which are children
I have a container div. Inside that container div are a number of smaller
I have a div that has multiple children divs. inside of the children divs
I have a container div listings_container that contains a variable number of divs listing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.