How to remove margin on a custom template
-
Hi there, I created a custom template just for the home page on the site, but there is a margin around the main content box.
I was just wondering how I could remove that so that if I inserted a image it would be exactly in the top left corner of that box with no padding or margins so I can position banners and content properly as the page is going to be mostly made up of full width banners…
Here is the code for the page template I made so far,
<?php /* Template Name: My Custom Template */ get_header(); ?> <div id="content" class="page col-full"> <div id="maincustom" class="fullwidthcustom"> <?php if (have_posts()) : while (have_posts()) : the_post();?> <div class="post"> <div class="entrytext"> <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?> </div> </div> <?php endwhile; endif; ?> <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?> </div> </div> <?php get_footer(); ?>and then I added this into the custom css
#maincustom .fullwidthcustom { width: 980px; padding: 0; margin: 0; }I hope this makes sense to someone as I really don’t know what I’m doing!
Thanks in advance, replied would be much appreciated!
The topic ‘How to remove margin on a custom template’ is closed to new replies.