WordPress.org

Ready to get started?Download WordPress

Forums

Left Div won't show up! (11 posts)

  1. keysuuh
    Member
    Posted 1 year ago #

    I have a Page template on this page:
    http://keihead.com/test/news
    I have "right_content" and "left_content"
    I'd like to display archives, categories, tags inside the "left_content" div but for some reason the div doesn't even appear on the page!!!
    PLEASE HELP!

  2. keysuuh
    Member
    Posted 1 year ago #

    a piece of the CSS:

    #content { overflow: hidden; background: #fff; width: 950px; padding: 15px; margin-top: 25px;}
    #right_content{ width: 600px; float: right;}
    #left_content { width: 200px; float: left; }
  3. keysuuh
    Member
    Posted 1 year ago #

    oh yeah and I widgetized the left_content,
    here is the html:

    <div id="left_content">
    <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('news')) : ?>
    <?php endif; ?>
    </div>
  4. keysuuh
    Member
    Posted 1 year ago #

    Also the background to the "content" div is as wide as the div but the height is killing me. I don't understand why the height of the div doesn't expand to the end of all content...

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You don't have any content in that div -- hence nothing shows on the page. Try putting a height and border in the CSS -- and it shows up.

    #sidebar {
        border: medium solid red;
        float: left;
        height: 500px;
        padding: 0 10px;
        text-align: left;
        width: 250px;
    }

    HTML elements only have the height of the content inside them -- or if you set the height to something.

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

  7. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Also the background to the "content" div is as wide as the div but the height is killing me. I don't understand why the height of the div doesn't expand to the end of all content...

    That's because the only content inside the content div (right-content div) is floated -- and floated elements are taken out of the normal flow of elements on the page. So the content div is functionally empty -- hence it does not go to below the right content div. You can force it to do so by putting something below the right-content div but still inside the content div -- like a period that is the same color as the div background -- so it's invisible but does what you want.

  8. keysuuh
    Member
    Posted 1 year ago #

    on the news page I actually do have another column.
    As I said before I have a "left_column" div to replace the sidebar.
    I posted part of the html to the news template...
    Used float: left; for that specific div.
    here is the CSS for the content (container) and the two divs I'd like to float...

    #content {  background: #fff; width: 950px; padding: 15px; margin-top: 25px;}
    #right_content{ width: 600px; float: right;}
    #left_content { width: 200px; float: left; }
  9. keysuuh
    Member
    Posted 1 year ago #

    and i tried to fix the errors i switched ul id="nav" to ul class="nav"
    but now the whole style for the ul list doesn't even work -_-

  10. keysuuh
    Member
    Posted 1 year ago #

    but if I delete class="nav" on all 4 sections of the navigation and delete .nav from the stylesheet it ends up working...why is that?

  11. keysuuh
    Member
    Posted 1 year ago #

    the reason I want the ul list to have an id or class is to seperate the top nav from any other ul lists

Topic Closed

This topic has been closed to new replies.

About this Topic