ThemeShaper Forums » Thematic

[closed]

How can I get content/an element/image/etc. OUTSIDE of #content div?

(10 posts)
  • Started 3 years ago by js09
  • Latest reply from Greenbear
  • This topic is not resolved

Tags:

  1. js09
    Member

    I want to have the date be displayed outside the #content div. Like a post-it not hanging on the side of the main blog. I tried z-index but that was a no go. !imporant didn't work either.

    Suggestions? I'm specifically referring to '.entry-date'

    Posted 3 years ago #
  2. AnotherAndrew
    Member

    Trying to do the same. Did you find a way?

    Posted 3 years ago #
  3. you could get it out of the .hentry div by overriding the loop.

    Posted 3 years ago #
  4. Negative margin? Absolute positioning? Depending on what, exactly, you're trying to do. Might one of those techniques work?

    Posted 3 years ago #
  5. I just happen to be having this problem myself so I thought I'd chime in here.

    I can't seem to get the content to go outside of the #content no matter what I try (ie. position absolute or relative) I've set the margin right to a negative (relative), tried overflow:visible, tried resetting the width of #main, #container etc... all to no effect, the content I am trying to set outside still gets cut at the outside of the #content or #container edge.

    I am interested in helgatheviking's suggestion but am not sure how to proceed there...any suggestions on how to break out?

    Posted 2 years ago #
  6. Ok, I've figured this out and thought I would pass on my findings for anyone else who runs into this.

    It appears that it's an overflow issue. I can only get it to work when the overflow is set to visible for both the #content and #main ids. This may require some #content bottom margin though as the main will lose it's margin-bottom. It may also create other problems...but that's how it breaks out.

    Posted 1 year ago #
  7. so i was mistaken a year ago (must've been a newb back then). you need to add the date to the thematic_abovecontent hook like so:

    function kia_add_date(){
    	if(!is_single()) return;
    	echo thematic_postmeta_entrydate();
    }
    add_action('thematic_abovecontent','kia_add_date');

    i made the assumption that this was only going to happen on single posts. then i presume you'll want to remove the date from its default position which you can achieve like so:

    function kia_remove_date($postmeta) {
    
    	if(!is_single()) return $postmeta;
    
    	ob_start(); ?>
    
    	<div class="entry-meta">
    		<?php echo thematic_postmeta_authorlink(); ?>
    		<?php echo thematic_postmeta_editlink();?>
    	</div><!-- .entry-meta -->
    
    	<?php
    	$postmeta = ob_get_contents();
    	ob_end_clean();
    	return $postmeta;
    }
    add_filter('thematic_postheader_postmeta','kia_remove_date');

    now that the markup has been rearranged it should be super simple to style as desired

    Posted 1 year ago #
  8. Thanks Helga, but I think you have posted a reply to a different thread? Or am I missing something?

    A follow up to my follow up...a quick note on the bottom of the #content, it can come up short if there are any floating divs that would normally be caught by the overflow...simply add a div at the bottom with a clear:both to draw the #content down. A side effect of WP is that when blank divs are entered into the html they get lost if switched to visual...simply place a . between the clearing div tags and style the color the same as your background and it holds when in visual mode (mostly for clients who are more WYSIWYG oriented).

    Posted 1 year ago #
  9. no, the OP wanted to display the date outside of the #content div. and when you picked up the thread you wanted to similarly display something outside of the #content div. i showed how to move the markup outside of #content instead of trying to bootleg is with CSS absolute positioning or negative margins or overflow.

    Posted 1 year ago #
  10. Ahh...ok. Good to know.

    Posted 1 year ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.