Title: width and class problems
Last modified: August 20, 2016

---

# width and class problems

 *  Resolved [vanhansen](https://wordpress.org/support/users/vanhansen/)
 * (@vanhansen)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/width-and-class-problems/)
 * So, I’ve been fixing something on my new design. It’s a way of scrolling horizontally
   and vertically.
 *     ```
       #box
       {
       	width:900px;
       	height:600px;
       	overflow-y:hidden;
       	overflow-x:auto;
       	margin: auto;
       }
   
       #content
       {
       	width:5400px;
       }
   
       .post
       {
       	width:900px;
       	height: 600px;
       	float:left;
       	overflow-y: scroll;
       }
       ```
   
 * This is the CSS and the divs are setup like this:
 *     ```
       <div id="box">
           <div id="content">
               <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>">
   
               </div><!-- post -->
           </div><!-- content -->
       </div><!-- box -->
       ```
   
 * So this works on more or less all the browser I’ve tested. However, opening a
   page is a bit more tricky.. the box width apperantly applies to the pages, although
   the post width is 900px..
 * Is it possible to add another class to a div, so it got two classes?
 * Any clues?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Pankaj Pandey](https://wordpress.org/support/users/pankajdey/)
 * (@pankajdey)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/width-and-class-problems/#post-2456738)
 * yes you can add two class to a post like class=”class1 class2″
 *  Thread Starter [vanhansen](https://wordpress.org/support/users/vanhansen/)
 * (@vanhansen)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/width-and-class-problems/#post-2456739)
 * Do you think that would work? I don’t see how that would work, although I asked
   for it..
 *  [Pankaj Pandey](https://wordpress.org/support/users/pankajdey/)
 * (@pankajdey)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/width-and-class-problems/#post-2456742)
 * Try and let me know. if you want to multiple class on one div it will work. you
   can add multiple (unlimited) class.
 *  Thread Starter [vanhansen](https://wordpress.org/support/users/vanhansen/)
 * (@vanhansen)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/width-and-class-problems/#post-2456744)
 * It didn’t work..
 * Is it possible to change the class on post’s and pages? After what I can see 
   it is the same class.. but at the same time I don’t understand why the width 
   doesn’t seem to apply to the pages but it works on the blog(index.php).. I haven’t
   changed any code, so it’s default sandbox theme..
 *  [Pankaj Pandey](https://wordpress.org/support/users/pankajdey/)
 * (@pankajdey)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/width-and-class-problems/#post-2456745)
 * you asked : Is it possible to add another class to a div, so it got two classes?
 * My answer is 100% correct. Please explain your question properly. give link
 *  Thread Starter [vanhansen](https://wordpress.org/support/users/vanhansen/)
 * (@vanhansen)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/width-and-class-problems/#post-2456753)
 * Yes you answered perfectly 🙂 Thank you!
 * [http://www.youmeandtheworld.com](http://www.youmeandtheworld.com)
 * The blogpart of the site is more or less how I want it to be.. Small adjustments..
 * [http://www.youmeandtheworld.com/route](http://www.youmeandtheworld.com/route)
 * See my problem? The .post class should apply to the text on the “route” page.
   What am I missing?
 *  [Pankaj Pandey](https://wordpress.org/support/users/pankajdey/)
 * (@pankajdey)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/width-and-class-problems/#post-2456757)
 * [http://www.youmeandtheworld.com/route](http://www.youmeandtheworld.com/route)
   in this link content not wraped with id box ie #box
 *  Thread Starter [vanhansen](https://wordpress.org/support/users/vanhansen/)
 * (@vanhansen)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/width-and-class-problems/#post-2456759)
 * Did it! Thank you! I had to change the ID on the content div and add the div 
   box. Brilliant! Thank you Pankaj, you saved me a lot of work!
 *  [Pankaj Pandey](https://wordpress.org/support/users/pankajdey/)
 * (@pankajdey)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/width-and-class-problems/#post-2456760)
 * Please make status of this post to resolved. Thanks

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘width and class problems’ is closed to new replies.

## Tags

 * [class](https://wordpress.org/support/topic-tag/class/)
 * [horizontal](https://wordpress.org/support/topic-tag/horizontal/)
 * [scroll](https://wordpress.org/support/topic-tag/scroll/)
 * [width](https://wordpress.org/support/topic-tag/width/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 2 participants
 * Last reply from: [Pankaj Pandey](https://wordpress.org/support/users/pankajdey/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/width-and-class-problems/#post-2456760)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
