WordPress.org

Ready to get started?Download WordPress

Forums

All padding and margins are not working in created theme (5 posts)

  1. loco2402
    Member
    Posted 2 years ago #

    I am attempting to add a WP blog to an existing site, using a tutorial I found online. I have everything working pretty well.

    However, none of my padding/margins are working on the blog page. Which is weird because all the other styles seem to work. I have tried numerous work arounds, moved code here and there, but no luck. I am thinking that something in the WP code is affecting it, but I can't figure it out. I am pretty new to WP, and there are so many pages, that I would not know where to look.

    Regular page with working spacing: http://www.ameliaislander.com/articles/article.php?ID=132

    Blog: http://www.ameliaislander.com/blogs/blog1/

    style.css: http://www.ameliaislander.com/blogs/blog1/wp-content/themes/islander/style.css

    If you go back and forth between the 2 pages, you will see what I mean. Any insight you could offer would be hugely appreciated.

  2. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    All the default margins are set to zero in the body tag CSS in siteNEW.css -- so then you would need to put back margins on every element where you want them. Some do have margins added back, but some don't -- hence spacing problems.

    Also be aware about how floated elements behave -- subsequent elements won't go below them unless they have "clear" (or there is a clear empty element in between them).

  3. o4tuna
    Member
    Posted 2 years ago #

    If you are not using FireFox and FireBug, you should.

  4. loco2402
    Member
    Posted 2 years ago #

    I tried Firebug, but it only showed me that some of the CSS was not working as I wanted. With my limited CSS experience, I could not see a solution thru that.

    However, that would not have helped anyway, as it turns out I had to change the <!DOCTYPE>.

    Not sure why, but my pages have to have
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    I originally had <!DOCTYPE HTML> as was in the WP pages I copied to modify.

    Any ideas why that is?

  5. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic