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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Mar 2012
    Posts
    160
    Thanks
    21
    Thanked 0 Times in 0 Posts

    Divs slightly offset..?

    Confused on why my divs are slightly offset on this page. The right div seems to be set up 10-20px from the left. Any ideas? Thanks
    http://www.patiocushionsite.com/restoration-hardware

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello taymag,
    This bit highlighted in red gets rid of the problem ... for now. I'm not sure why making .product-box inline-block is doing that.
    Code:
    .product-box {
        border: 2px solid #C9C9C9;
        box-shadow: 0 0 13px #808080;
        display: inline-block;
        height: 270px;
        margin: 15px;
        padding: 10px;
        text-align: center;
        vertical-align: top;
        width: 400px;
    }
    Any reason for using the paragraph tag so much? I see you use empty p tags for creating space around your heading, you also wrap anchors, images and div elemtents with p tags. If you look at it semantically, those are not paragraphs and the p tag should not be used there.
    Last edited by Excavator; 02-21-2013 at 06:28 PM.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder
    Join Date
    Mar 2012
    Posts
    160
    Thanks
    21
    Thanked 0 Times in 0 Posts
    Thanks that worked perfect! As far as the p tags, I think it is Wordpress causing this. I don't use wysiwyg anymore but when I made this like 5 years ago I think it messed my coding up switching back from html to wysiwyg without saving multiple time. Thanks for pointing it out though I need to get to the bottom of that. In the html view on that page I only have 1 p tag used in that top paragraph so I dont know why it is doing that


  •  

    Posting Permissions

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