I am having trouble getting my text to be horizontally centered and padded by 17px from the top of my DIV called .balloon This DIV shows up in the index.php and single.php pages. The picture I have posted in the background looks like a comment balloon. The DIV itself is 48 pixels in height and 100 pixels in width. The comment balloon graphic inside the DIV has a pointer coming from the bottom of the balloon part of it so the direct vertical center of the main balloon is around 17px to 19px from the top. I assume I will need to use padding but how do I use it with out making the div bigger. I just need the padding to affect only the text within the .balloon DIV. How do I do that?
Here is the site link:
http://criticall.co.cc/
Here is the style.css code:
/* criticall http://criticall.co.cc/
Highlite Blue: #0066ff Black Text: #000000 Middle Gray: #666666 */
/* RESET */
* {margin:0; padding:0;} html {overflow-y: scroll;} html,body {height:100%} body {font-size: 12px; font-family:Arial, san-serif; color: #000000; background: url(/images/topbar-background.png) top center repeat-x white;}
<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) { // Both Comments and Pings are open ?><a href=\"<?php trackback_url(); ?>\" rel=\"trackback\">trackback</a>
<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) { // Only Pings are Open ?> Responses are currently closed, but you can <a href=\"<?php trackback_url(); ?> \" rel=\"trackback\">trackback</a> from your own site.
<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) { // Comments are open, Pings are not ?> You can skip to the end and leave a response. Pinging is currently not allowed.
<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) { // Neither Comments, nor Pings are open ?> Both comments and pings are currently closed.
<?php } edit_post_link('Edit this entry','','.'); ?>
<p class=\"center\">Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
<?php endif; ?>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Thank you for your help and time.
PS: I added black background to the .ballon div so you can see that it is in the right position. When I add padding to the .balloontext div, the whole balloon div shifts position. confusing.
It's Saturday evening and I'm on my way out, so for now I'll just point you in the direction of this nifty little (css-)trick http://css-tricks.com/vertically-center-multi-lined-text/
thanks but I think maybe the first suggestion to add padding was better though you were mistaken on where to apply it (my fault for unclear explanation before). Like I said in my newly edited and UPDATED 1st post, I would need 17px top padding for the text of my .balloon DIV. I am pretty certain that padding will solve my problem but any attempt I have made at adding padding has offset the .balloon DIV along with the text. I need the .balloon DIV to stay put and just have the text get padding.
so if you could refer to the 1st post I made. IT had a clearer explanation and updated code.
UPDATED!
I am having trouble getting my text to be horizontally centered and padded by 17px from the top of my DIV called .balloon This DIV shows up in the index.php and single.php pages. The picture I have posted in the background looks like a comment balloon. The DIV itself is 48 pixels in height and 100 pixels in width. The comment balloon graphic inside the DIV has a pointer coming from the bottom of the balloon part of it so the direct vertical center of the main balloon is around 17px to 19px from the top. I assume I will need to use padding but how do I use it with out making the div bigger. I just need the padding to affect only the text within the .balloon DIV. How do I do that?
Here is the site link:
http://criticall.co.cc/
Here is the style.css code:
Here is the single.php code:
Here is the index.php code:
Thank you for your help and time.
PS: I added black background to the .ballon div so you can see that it is in the right position. When I add padding to the .balloontext div, the whole balloon div shifts position. confusing.
Adam
So without having a clue how your comments are set up I would guess that you target the contents of div.comments
.comments li p {padding: some pixels;
}
or whatever.
http://criticall.co.cc/
It's Saturday evening and I'm on my way out, so for now I'll just point you in the direction of this nifty little (css-)trick http://css-tricks.com/vertically-center-multi-lined-text/
so if you could refer to the 1st post I made. IT had a clearer explanation and updated code.
thanks,
adam
http://wordpress.org/support/topic/291221?replies=5
he suggested padding-top. it worked. :)