Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS spacing issue

    Hi all,

    I am styling a very basic div with some very basic CSS but running into some problems. By profession, I am a print designer, so excuse my lack of appropriate terminology.

    I have a class I want a "space after" before the next item shows inside the div. I am familiar with the "margin-bottom: 10px;" style, but it is not working. It's strange because if it set to "margin: 10px;" the left and right get a 10 pixel margin, but neither the top or bottom get what i want (I actually only want to target the bottom). I'm assuming I just have a conflicting style that's overriding what I'm after, but can't figure it out.

    Here are the live URL's:

    HTML: http://www.brandonknowlden.com/papermusic/index2.html

    CSS: http://www.brandonknowlden.com/paper...SS/newSite.css
    --

    Any help would be much appreciated.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,876
    Thanks
    6
    Thanked 1,035 Times in 1,008 Posts
    Learn about the difference between inline elements and block-level elements. To answer your question: top and bottom margins don’t work on inline elments. It would be more appropriate to use heading elements anyway since these yellow things are basically headings but you aren’t currently marking them up as such.

    And also learn to use lists when they are appropriate. The secret of great websites is at first semantic code. The styling is second only.

  • #3
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    This site may be of use to you.

    Many more here.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #4
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    will look into it, thanks guys, much appreciated.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •