Forums
Forums / Fixing WordPress / PHP code for padding?
(@worldsnapper)
14 years, 11 months ago
Hi,
I have inserted the following line of code into my Blog Page Template (blog-page.php) to display a slideshow…
<?php show_showtime ("id=5365|width=960|height=350"); ?> [Please post code snippets between backticks or use the code button.]
<?php show_showtime ("id=5365|width=960|height=350"); ?>
However I want to add some padding so that there is more space between the slideshow and menu bar. Click HERE to see what I mean.
Does anyone know what I need to add to this line of code to create some top padding?
Thanks
(@k-fella)
Add padding or margins to #menu in your style.css file.
#menu { margin-bottom: 10px; /* or padding-bottom: 10px; if margin doesn't work */ }
Cheers K-Fella, but I don’t want to add padding to the bottom of the menu as this will make the space between the menu & slideshow on the others pages too much. It is only the padding between the menu & slideshow on the blog page I want increasing
Use conditional tags in your template. For instance:
<div id="menu" <?php if ( is_page('blog') ) { echo 'class="blogmenu"' } ?>
Then add a new style for .blogmenu with the extra margin/padding.
The topic ‘PHP code for padding?’ is closed to new replies.