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 6 of 6

Thread: Padding Issue

  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Location
    N. Ireland
    Posts
    351
    Thanks
    16
    Thanked 4 Times in 4 Posts

    Padding Issue

    My Dev Site

    I have an image in my div left box. The image has class right and .right has attributes given margin of 5px to left for breathing room.

    The problem is that the image does not give its desired breathing room.

    Any help?

    D.
    Daemonkin.
    If this was helpful, please add to my reputation
    Thousand Sons - Freelance Web Developer - ninetyonedegrees.com

  • #2
    Regular Coder
    Join Date
    Jan 2009
    Posts
    316
    Thanks
    7
    Thanked 92 Times in 91 Posts
    The order looks correct, however your margin is being overridden by this in main.css:

    Code:
    div#content img, div#right_col img {
     border: 0;
     padding: 0;
     margin: 0;
     display: block;
    }
    If you eliminate the margin:0 here, it works.

  • Users who have thanked Fisher for this post:

    daemonkin (04-02-2009)

  • #3
    Regular Coder
    Join Date
    Jun 2007
    Location
    N. Ireland
    Posts
    351
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Thanks for the reply Fisher and I have removed the margin: 0 from content img but the margin is still not showing up in the left_box img.

    Any more thoughts?

    D.
    Daemonkin.
    If this was helpful, please add to my reputation
    Thousand Sons - Freelance Web Developer - ninetyonedegrees.com

  • #4
    Regular Coder
    Join Date
    Jun 2007
    Location
    N. Ireland
    Posts
    351
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Never mind Fisher. Idiot me messing around with tring to get this working I forgot to fix the messes I made.

    D.
    Daemonkin.
    If this was helpful, please add to my reputation
    Thousand Sons - Freelance Web Developer - ninetyonedegrees.com

  • #5
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    How about
    Code:
    img.right {/*main.css (line 430)*/
    background-color:#CC0000;
    display:inline;
    float:right;
    margin-left:5px;
    }
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    daemonkin (04-02-2009)

  • #6
    Regular Coder
    Join Date
    Jun 2007
    Location
    N. Ireland
    Posts
    351
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Thanks Abduraooft. Figured that one out all by myself!

    That was a remnant of trying to float left and margin right when the float right and margin left did not work.

    Cheers.

    D.
    Daemonkin.
    If this was helpful, please add to my reputation
    Thousand Sons - Freelance Web Developer - ninetyonedegrees.com


  •  

    Posting Permissions

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