Hi!

I want to move the right sidebar so it's inside the div id="content". I moved it in the tpl.php file but it get placed under the content div instead inside of it even though it's in the right place in the tpl.php. I tried flushing the cache.

Comments

cfox612’s picture

before the right sidebar.

Can you copy/paste some code here of the beginning of the content section where the right side is?

annahelin’s picture

Here is some of the code from the tpl:

      <div id="content"><div id="content-inner">

        <?php if ($mission): ?>
          <div id="mission"><?php print $mission; ?></div>
        <?php endif; ?>

        <?php if ($content_top): ?>
          <div id="content-top" class="region region-content_top">
            <?php print $content_top; ?>
          </div> <!-- /#content-top -->
        <?php endif; ?>

        <?php if ($breadcrumb || $title || $tabs || $help || $messages): ?>
          <div id="content-header">
            <?php print $breadcrumb; ?>
            <?php if ($title): ?>
              <h1 class="title"><?php print $title; ?></h1>
            <?php endif; ?>
            <?php print $messages; ?>
            <?php if ($tabs): ?>
              <div class="tabs"><?php print $tabs; ?></div>
            <?php endif; ?>
            <?php print $help; ?>
          </div> <!-- /#content-header -->
        <?php endif; ?>

        <div id="content-area">
          <?php print $content; ?>
     
      
         <?php if ($right): ?>
        <div id="sidebar-right"><div id="sidebar-right-inner" class="region region-right">
          <?php print $right; ?>
        </div></div> <!-- /#sidebar-right-inner, /#sidebar-right -->
      <?php endif; ?>

  </div>

        <?php if ($feed_icons): ?>
          <div class="feed-icons"><?php print $feed_icons; ?></div>
        <?php endif; ?>

        <?php if ($content_bottom): ?>
          <div id="content-bottom" class="region region-content_bottom">
            <?php print $content_bottom; ?>
          </div> <!-- /#content-bottom -->
        <?php endif; ?>

      </div></div> <!-- /#content-inner, /#content -->

And here is from the website HTML:

<div id="header">
</div>
<div id="main">
<div id="main-inner" class="clear-block">
<div id="content">
<div id="content-inner">
<div id="content-header">
</div>
<div id="content-area">
</div>
</div>
</div>
<div id="sidebar-right">
<div id="sidebar-right-inner" class="region region-right">
</div>
</div>
</div>
</div>
<div id="footer">
cfox612’s picture

your sidebar is inside the main-inner.

<div id="main">

<div id="main-inner" class="clear-block">

<div id="content">

<div id="content-inner">

<div id="content-header">
</div> --end content header

<div id="content-area">
</div> -- end content area

</div> -- end content inner
</div> -- end content

<div id="sidebar-right">
<div id="sidebar-right-inner" class="region region-right">
</div>
</div>

</div>
</div>
<div id="footer">

annahelin’s picture

Yes I know that, but I do not know how to change in the tpl to get it inside the content div, because in the tpl it is inside the content div.

cfox612’s picture

since it appears after the print $content.

What's your css on the right sidebar? If it's a float then it needs to come before the print $content.

annahelin’s picture

No, there is no float. The css looks like this:

 background-image: url("formularBakgrund.jpg");
    background-repeat: no-repeat;
    height: 430px;
    width: 320px;
    margin-left: -140px;
    margin-top: 680px;
    padding-left: 30px;
    padding-top: 20px;
cfox612’s picture

below the content as per your code:

<div id="content-area">
          <?php print $content; ?> <-- displaying content -->
     
      
         <?php if ($right): ?> <-- displaying sidebar AFTER content -->
        <div id="sidebar-right"><div id="sidebar-right-inner" class="region region-right">
          <?php print $right; ?>
        </div></div> <!-- /#sidebar-right-inner, /#sidebar-right -->
      <?php endif; ?>

If you want your sidebar beside your content it needs to go before the content, and have a float right.