# Aligning Div content to top

**URL:** https://forum.kirupa.com/t/aligning-div-content-to-top/281851
**Category:** web dev
**Created:** [February 13, 2009, 9:00pm UTC](https://forum.kirupa.com/t/aligning-div-content-to-top/281851 "2009-02-13T21:00:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Kevin\_B](https://avatars.discourse-cdn.com/v4/letter/k/a88e4f/32.png) [@Kevin\_B](https://forum.kirupa.com/u/Kevin_B)
#### Post date: [February 13, 2009, 9:00pm UTC](https://forum.kirupa.com/t/aligning-div-content-to-top/281851/1 "2009-02-13T21:00:49Z")

</div>

I have the following div, which I want to align to the top-left of the browser:

```auto
<body onload="javascript:setDefaults();">
  <div class="top">
             <img alt="foo" src="foo.gif" align="left" border="0" />
             <p class="headers">
                 <b>Header title</b>
             </p>
             <p class="headers">other header stuff</p>
  </div>
<!-- ...more code... /-->

```

The affiliated css is:

```auto

        div.top {
            top: 0px;
            width: 750px;
            height: 100px;
            background-color: #FFFFFF;
        }

```

In IE6 it properly aligns it to the top, but in FF there is a gap between the top of the browser and the top of the tab – I’d guess approximately 20px.
