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

  • Home
  • SEARCH
  • 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 3681216
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:39:57+00:00 2026-05-19T03:39:57+00:00

hey guys, i can’t seem to get it working. i have a div.post with

  • 0

hey guys,
i can’t seem to get it working.

i have a div.post with #comments and a #respond form underneath it. the div.post contains the #comments and the #respond form. i simply want to float the sidebar to the right of the entire div.post and i cannot seem to get it work.

here is an example. any idea how to solve that – its probably quite simple. 🙂

<!DOCTYPE html>

<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>layout</title>

    <style type="text/css">

    body {
        margin:0;
        padding:0;
    }

    #main {
        background:#cfcfcf;
    }

    .inner {
        margin: 0 auto;
        padding: 96px 72px 0;
        width: 1068px;
        border-color: #000;
        border-style: solid;
        border-width: 0 1px;
        color: #3C3C3C;
    }

    .post {
        width: 705px;
        background:#999;
    }

    #comments, #respond {
        width: 705px;
        background:#999;
    }

    #sidebar {
        width:338px;
        background:#777;
        margin-left:730px;
    }

    </style>
</head>
<body>

    <div id="main">

        <div class="inner">

        <div id="post" class="post">

            <h2>Lorem Ipsum Test Page</h2>

            <div class="entry">

                <p>Lorem ipsum sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>

                <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>

            </div> <!-- entry -->

            <div id="comments">

                <h2>One Response</h2>

                <ol class="commentlist">
                    <li id="comment" class="comment">
                        <div class="comment-body">
                            <div class="comment-author vcard">
                                Tom says:
                            </div>

                            <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea found. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>

                        </div>
                    </li>
                </ol>
            </div> <!-- comments -->

            <div id="respond">

                <h2>Leave a Reply</h2>

                <form id="commentform" method="post" action="">

                    <input type="text" aria-required="true" tabindex="1" size="22" value="" id="author" name="author" gtbfieldid="230"> <label for="author">Name (required)</label>

                    <input type="text" aria-required="true" tabindex="2" size="22" value="" id="email" name="email" gtbfieldid="231"> <label for="email">Mail (will not be published) (required)</label>

                    <input type="text" tabindex="3" size="22" value="" id="url" name="url" gtbfieldid="232"> <label for="url">Website</label> </div>

                    <textarea tabindex="4" rows="10" cols="58" id="comment" name="comment"></textarea>

                    <input type="submit" value="Submit Comment" tabindex="5" id="submit" name="submit">
                    <input type="hidden" id="comment_post_ID" value="36" name="comment_post_ID">
                    <input type="hidden" value="0" id="comment_parent" name="comment_parent">

                </form>

            </div> <!-- respond -->

        </div> <!-- post -->

        <div id="sidebar">

            <h2>Meta</h2>
                <ul>
                    <li>Login</li>
                    <li>Anything</li>
                </ul>

            <h2>Subscribe</h2>
                <ul>
                    <li>Entries (RSS)</li>
                    <li>Comments (RSS)</li>
                </ul>

        </div> <!-- sidebar -->

        </div> <!-- inner -->

    </div> <!-- main -->

</body>
</html>

edit: can you see any errors in my html. firebug says that the sidebar div is actually outside the .inner div. however if i look at the code it’s inside.

  • 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-05-19T03:39:57+00:00Added an answer on May 19, 2026 at 3:39 am

    There are several ways to handle this. However, you have not set the float property for either div#sidebar or div.inner. Try adding float: left; to both and remove the margin-left property from div#sidebar.

    You’ll probably need to adjust your widths.

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

Sidebar

Related Questions

hey guys, i have a form that can be influenced with up and down
Hey guys, if anybody can help me out i'd love it... What i have
Hey guys, this is simple but I can't make it workn... blah! I have
Hey Guys, I can't seem ti understand why these trivial named anchors here are
hey guys, somehow i can't find the solution for my little problem. i have
Hey guys, can anyone explain me what (id)sender exactly means? I have seen it
Hey guys! I have a dijit.form.ComboBox that needs have value checking applied against it.
hey guys can you please help me again, i want my restaurant system to
Hey guys can you help me with this. I've got this '/[^A-Za-z]/' but cannot
Hey guys, I have some code that I found that I would rather use

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.