ThemeShaper Forums » Thematic

[closed]

How can I create an extra DIV?

(7 posts)
  • Started 2 years ago by Mich.
  • Latest reply from benfrain.com
  • This topic is not resolved
  1. I want to put an image above my sidebar. It has the same width as the sidebar and I want to put it between the header and the sidebar.

    I guess I'll have to put a new div above my sidebar and put the image there. (is that right?)

    Any Idea's on how to create that extra div?

    To give you an Idea:

    This is how I want it:
    http://www.brandnewfever.nl/opzet_v1.0.jpg

    And this is how I'm stuck:
    http://www.brandnewfever.nl

    Posted 2 years ago #
  2. do some reading on hooks and filters. here's a good post i just wrote the other day
    http://forums.themeshaper.com/topic/need-help-understanding-actions-vs-filters-and-changing-post-meta-and-utility#post-22638

    Posted 2 years ago #
  3. Thanks I will give it a read :)

    Posted 2 years ago #
  4. While hooks and filters are good to know (I struggle), you are probably just wanting to utilize some CSS.

    It looks as if your sidebar won't be terribly complicated, if that is the case, try just moving the sidebar up on top of the header with a negative top margin.

    Change existing or add this to your CSS file..

    This part moves the sidebar up into the header area.

    #primary { margin-top: -100px; }

    Now you may notice your sidebar goes underneath the header, that is because of a z-index that is set by default (not sure why, drop downs?). So this will reset that.

    #header { z-index: auto; }

    Now it is still going to be hidden behind the main div, the reason is it is set to overflow:hidden. Now this only really comes into play as far as I know for clearing background images that repeat and is never necessary. So modify that too.

    #main { overflow: inherit; }

    This will be much easier than adding a new div, but still learn those hooks and filters. ;)

    Posted 2 years ago #
  5. Thank you for your post!
    I will try this when I got home after work :)

    And yes still practicing with hooks and filters :-)

    Posted 2 years ago #
  6. Thank you for your post!
    I will try this when I got home after work :)

    And yes still practicing with hooks and filters :-)

    Posted 2 years ago #
  7. i'd probably put that div on thematic_abovemainasides and then give it the same class as the regular asides.... so aside and main-aside. but give it an ID so that you can target it w/ a negative margin. that's how i usually put signup forms in that spot that are in the sidebar, but also covering up the header.

    Posted 2 years ago #
  8. Not sure if this helps but I added som code at the top of my asides by sticking the following in the functions.php

    // Puts content above the asides
    function my_above_asides() { ?>
    *Your Code Here*
    <?php }
    
    add_action('thematic_abovemainasides', 'my_above_asides');
    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.