CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   Divs slightly offset..? (http://www.codingforums.com/showthread.php?t=288065)

taymag 02-21-2013 04:37 PM

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 :thumbsup:
http://www.patiocushionsite.com/restoration-hardware

Excavator 02-21-2013 05:26 PM

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.

taymag 02-21-2013 05:42 PM

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


All times are GMT +1. The time now is 11:54 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.