Skip to main content
Inspiring
February 5, 2009
Answered

Content at Top of Page

  • February 5, 2009
  • 2 replies
  • 581 views
When I create a new page in CF, the topmost image appears near the top, but there's about a 10px gap, same problem with text. On apps like Facebook and Google the gap is much smaller. Does anyone know how this is defined?

Thanks!
This topic has been closed for replies.
Correct answer Newsgroup_User
kodemonki wrote:
> When I create a new page in CF, the topmost image appears near the top, but
> there's about a 10px gap, same problem with text. On apps like Facebook and
> Google the gap is much smaller. Does anyone know how this is defined?
>
> Thanks!
>

Have you styled the html and body nodes? Most browsers have a default
margin or padding on one or both of these. So if you want full control
start your css with something like.

html, body {
margin: 0;
padding: 0;
}

Then you can create what space you desire either here or else where in
your document.

Also be careful of any extraneous whitespace that can be generated with
CFML code. If the above does not work as expected you may have some of
unintended whitespace characters at the top of your page.

2 replies

kodemonkiAuthor
Inspiring
February 5, 2009
Oh thank you so much; it's PERFECT!
Newsgroup_UserCorrect answer
Inspiring
February 5, 2009
kodemonki wrote:
> When I create a new page in CF, the topmost image appears near the top, but
> there's about a 10px gap, same problem with text. On apps like Facebook and
> Google the gap is much smaller. Does anyone know how this is defined?
>
> Thanks!
>

Have you styled the html and body nodes? Most browsers have a default
margin or padding on one or both of these. So if you want full control
start your css with something like.

html, body {
margin: 0;
padding: 0;
}

Then you can create what space you desire either here or else where in
your document.

Also be careful of any extraneous whitespace that can be generated with
CFML code. If the above does not work as expected you may have some of
unintended whitespace characters at the top of your page.