ThemeShaper Forums » Thematic

[closed]

Add div inside #main

(9 posts)
  • Started 4 years ago by Iceman
  • Latest reply from Iceman
  • This topic is resolved

Tags:

  1. Iceman
    Member

    Hi, sorry... one more question!
    How can i put a new div INSIDE the main? i'm trying to create a background effect with superposition of images... maybe with a clean div bringing my png image over the original main, that shows the base image... anyway, i don't want to use the belowheader.
    Thanks a lot.

    Posted 4 years ago #
  2. try abovecontainer

    Posted 4 years ago #
  3. Iceman
    Member

    Haha, works perfectly! I thought that "abovecontainer" could put the div above the main one, and not inside it, so i don't tried haha
    Thanks

    Posted 4 years ago #
  4. Iceman
    Member

    Unfortunately, there's no "belowcontainer". Something i could do similar to this?

    Posted 4 years ago #
  5. there is a "belowcontainer"

    Posted 4 years ago #
  6. Iceman
    Member

    Oh yeah? Well, i'll try i little more, first attempt didn't worked... It was:
    To insert my div above (works fine)
    function newdiv() {
    echo "<div id='maintopper'>";
    }
    add_action('thematic_abovecontainer','newdiv');

    so, to put the div below, tried (not working)
    function newdivtwo() {
    echo "<div id='mainbase'>";
    }
    add_action('thematic_belowcontainer','newdivtwo');

    Posted 4 years ago #
  7. may be a float issue with the exisiting content area and sidebar.
    have you tried clearing floats for the belowcontainer div

    Posted 4 years ago #
  8. if that is exactly the code that you are using then you aren't closing your divs properly and WP could be messing that up.

    function newdiv() {
    echo "<div id='maintopper'></div>";
    }
    add_action('thematic_abovecontainer','newdiv');
    
    function newdivtwo() {
    echo "<div id='mainbase'></div>";
    }
    add_action('thematic_belowcontainer','newdivtwo');

    or i dont think you are doing this but if you want to wrap everything inside of #main in another div you'd do

    function newdiv() {
    echo "<div id='main-inside'>";
    }
    add_action('thematic_abovecontainer','newdiv');
    
    function newdivtwo() {
    echo "</div>";
    }
    add_action('thematic_belowcontainer','newdivtwo');
    Posted 4 years ago #
  9. Iceman
    Member

    Sorry, when i said "not working" really it means "working not properly". Using my code, the newdivtwo don't appear and mess up all the page (styles, positions...)
    I'll try this and soon leave the answer, thanks.

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.