Support » Fixing WordPress » width and class problems

  • Resolved vanhansen

    (@vanhansen)


    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

    (@pankajdey)

    yes you can add two class to a post like class=”class1 class2″

    vanhansen

    (@vanhansen)

    Do you think that would work? I don’t see how that would work, although I asked for it..

    Pankaj Pandey

    (@pankajdey)

    Try and let me know. if you want to multiple class on one div it will work. you can add multiple (unlimited) class.

    vanhansen

    (@vanhansen)

    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

    (@pankajdey)

    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

    vanhansen

    (@vanhansen)

    Yes you answered perfectly 🙂 Thank you!

    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

    See my problem? The .post class should apply to the text on the “route” page. What am I missing?

    Pankaj Pandey

    (@pankajdey)

    http://www.youmeandtheworld.com/route in this link content not wraped with id box ie #box

    vanhansen

    (@vanhansen)

    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

    (@pankajdey)

    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.