I have a content region, which all my content is printed to and inside that region i have my secondarymenu block which only shows on certain pages. I'm trying to get my secnodarymenu block on the right, while having the content on the left. Right now my nodes are clearing both sides so its goin across the whole page while my menu is under the node. how do I get my nodes to be in a div?

Comments

arh1’s picture

it's hard to give any specifics w/o seeing your site/code, but generally in your theme/template file (e.g. page.tpl.php) just wrap whatever markup you want around <?php print $content; ?>.

also, if you use Firefox i'd strongly recommend the Firebug extension/add-on -- it's hugely helpful in Drupal theming as it shows you, among loads of other helpful info, how all the various CSS rules used by Drupal and your theme cascade together.

JaymeNYC’s picture

I've thought of this, but a problem I cant seem to get around is some pages r 780px in width and this would work fine, and some other pages have a sidebar/secondary menu which makes the content area about 580px. How could I get around this?

zbricoleur’s picture

Just edit the node.tpl.php file.

JaymeNYC’s picture

it is a phptemplate, but I created my theme from scratch so dont currently have a node.tpl.php file. What would I put in this file so it displays within a div?

zbricoleur’s picture

Here is one example of a node.tpl.php file. Look at most any other phptemplate theme to see other examples. You could just add a class to the wrapping div in this example.

  <div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
    <?php if ($picture) {
      print $picture;
    }?>
    <?php if ($page == 0) { ?><h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2><?php }; ?>
<!-- 
    <span class="submitted"><?php print $submitted?></span>
    <span class="taxonomy"><?php print $terms?></span>
 -->
    <div class="content"><?php print $content?></div>
    <?php if ($links) { ?><div class="links">&raquo; <?php print $links?></div><?php }; ?>
  </div>
JaymeNYC’s picture

I tried this and it still confused me since I have diff widths for nodes. What I did that seemed to work was style node-6 which is the node that my text is printing in. Will the node number ever change? Or what about placing the node in a block? Unsure how I would do this in D6 though

zbricoleur’s picture

Try this for node.tpl.php, and apply the CSS to #style_me

  <div id="style_me">
    <?php print $content?>
  </div>