Jump to content

Building grid that doesn't wrap at window borders...


RIRedinPA

Recommended Posts

I'm trying to build a grid to display data but I keep running into a problem in all browsers where the "cells" wrap when they reach the window's right edge, I want them to just go off on into ad infinitum...

 

My page is laid out this way:

 

<div id="main">
   <div id="content">
      <div id="headers">
          <ul id="h1r1">
            <li class="item"><div id="h1item">Stuff goes here</div></li>
            <!--...many more <li>-->
         </ul>
      </div>

      <div id="group1">
          <ul id="g1r1">
            <li class="item"><div id="g1r1i1">Stuff goes here</div></li>
            <!--...many more <li>-->
         </ul>

         <ul id="g1r2">
            <li class="item"><div id="g1r2i1">Stuff goes here</div></li>
            <!--...many more <li>-->
         </ul>
      </div>

   </div><!--end content-->
</div><!--end main-->

 

and the relevant css

 

* { 
border: 0px;
margin: 0px;
padding: 0px;
}

html {
background-color: #eee;
}

body {
font-size:100%;
}

#main { 
position: absolute; 
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}

#content { 
position: relative; 
left: 100px; 
top: 70px;
height: 60%;
overflow: scroll;
padding-right: 16px;
}

#content ul { 
list-style-type: none;
background-color: #fff;
}


#content li.item {
float: left; 
width: 120px;
min-height: 25px;
max-height: 25px;
background-color: #fff;
border: 1px solid black;
}


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.