# Div Align. Gotta be a margin problem?

**URL:** <https://forum.kirupa.com/t/div-align-gotta-be-a-margin-problem/263121>\
**Category:** web dev\
**Created:** [June 12, 2008, 6:59pm UTC](https://forum.kirupa.com/t/div-align-gotta-be-a-margin-problem/263121 "2008-06-12T18:59:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![w1sh](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@w1sh](https://forum.kirupa.com/u/w1sh)\
**Post date:** [June 12, 2008, 6:59pm UTC](https://forum.kirupa.com/t/div-align-gotta-be-a-margin-problem/263121/1 "2008-06-12T18:59:10Z")

</div>

[http://webs.ashlandctc.org/csimmons/sites/designs/pages/index\_beta\_help.htm](http://webs.ashlandctc.org/csimmons/sites/designs/pages/index_beta_help.htm)  
[http://webs.ashlandctc.org/csimmons/sites/designs/pages/style.css](http://webs.ashlandctc.org/csimmons/sites/designs/pages/style.css)

My Content box won’t snuggle with my Directory. I’m sad. Why don’t they love each other?

---

<div class="post-metadata">

**Author:** ![fasterthanlight](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@fasterthanlight](https://forum.kirupa.com/u/fasterthanlight)\
**Post date:** [June 12, 2008, 7:04pm UTC](https://forum.kirupa.com/t/div-align-gotta-be-a-margin-problem/263121/2 "2008-06-12T19:04:05Z")

</div>

Add to the top of your CSS

- p { margin: 0; }

Add in where your #content { } is  
#content p { padding-bottom: 10px; }

---

<div class="post-metadata">

**Author:** ![w1sh](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@w1sh](https://forum.kirupa.com/u/w1sh)\
**Post date:** [June 12, 2008, 7:12pm UTC](https://forum.kirupa.com/t/div-align-gotta-be-a-margin-problem/263121/3 "2008-06-12T19:12:26Z")

</div>

wtf. how weird that p displays even when it’s in a holder…  
I’ll never understand these computers and their _log-ic_.

Btw, I love you. 🙂

Edit: Which is why I took your icon suggestions. hehe

---

<div class="post-metadata">

**Author:** ![fasterthanlight](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@fasterthanlight](https://forum.kirupa.com/u/fasterthanlight)\
**Post date:** [June 12, 2008, 7:25pm UTC](https://forum.kirupa.com/t/div-align-gotta-be-a-margin-problem/263121/4 "2008-06-12T19:25:36Z")

</div>

lol,

all p tags have a default of 10px top and bottom margin, check out eric meyers reset.css if this kind of thing bugs you

> **[Eric's Archived Thoughts: Reset Reloaded](http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/)**
>
> After a bit of time to bake and a few more suggestions from readers, I have what I’m willing to call the final version of my take on the topic of reset styles.

---

<div class="post-metadata">

**Author:** ![w1sh](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@w1sh](https://forum.kirupa.com/u/w1sh)\
**Post date:** [June 12, 2008, 7:47pm UTC](https://forum.kirupa.com/t/div-align-gotta-be-a-margin-problem/263121/5 "2008-06-12T19:47:14Z")

</div>

Oh nice. I never even thought of making something like that. I don’t know why either. I always start off pages with body { go away margins and padding } but not anything else.  
Great piece of code.

---

<div class="post-metadata">

**Author:** ![fasterthanlight](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@fasterthanlight](https://forum.kirupa.com/u/fasterthanlight)\
**Post date:** [June 12, 2008, 9:51pm UTC](https://forum.kirupa.com/t/div-align-gotta-be-a-margin-problem/263121/6 "2008-06-12T21:51:14Z")

</div>

Yea that just applies to the body {} not anything within it.
