Jump to content
Sign in to follow this  
missyjknox

CSS Property to Space Page Elements

Recommended Posts

missyjknox

Hello, I created an archive.php template to add my archive page with this code: <?php /* Template Name: Archives */ get_header(); ?>

<?php the_post(); ?>

<?php the_title(); ?>

<?php get_search_form(); ?>

Archives by Month:

  • <?php wp_get_archives('type=monthly'); ?>

Archives by Subject:

  • <?php wp_list_categories(); ?>
<?php get_sidebar(); ?> <?php get_footer(); ?> I am happy with the result, but need to add CSS to put space between the elements (everything is too close together). Which CSS property do I use?

Share this post


Link to post
Share on other sites
missyjknox

I'll start with margin...

Share this post


Link to post
Share on other sites
kastelic

margin or padding. Which elements do you want to seperate?

Share this post


Link to post
Share on other sites
missyjknox

Hey Kastelic I want to put space between the nav menu and search bar; search bar and archives by month, etc.

Share this post


Link to post
Share on other sites
kastelic

Try for starters: .page-template-archives-php #primary-nav{ margin-bottom:15px; } .page-template-archives-php h2{ margin:10px; }

Share this post


Link to post
Share on other sites
missyjknox

Hey Kastelic, sorry for the delay, but I can only address theme issues on Mondays when I have the time. Your CSS above did not work.

Share this post


Link to post
Share on other sites
kastelic

It should work. I don't see the code in your custom CSS. Did you try adding !important like: .page-template-archives-php #primary-nav{ margin-bottom:15px !important; } To be clear, we are talking about this page correct? http://acedoubleyou.com/archives-2/

Share this post


Link to post
Share on other sites
missyjknox

I removed the code after I didn't see any change. Copied and pasted the new code and added pixels and now I can see a difference. Thank you much!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×