473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Why Does Firefox Add Space at Div Top Before printing Text?

i have the following code in my html page:

<div id="logoHeader">
<h2>These boxes aren't so tough!</h2>
</div>

i link to a style sheet with the following code:

@font-face {font-family: "Georgia"; SRC url(common/Georgia.TTF);}
#logoHeader { position:absolute;
top: 1px;
left: 10px;
width: 760px;
height: 100px;
background: #F8F8F8;
padding-top: 1px;
padding-left: 1px;
padding-bottom: 1px;
padding-right: 1px;
padding: 0px;
border: 4px;
border-style: groove;
margin: 0px;
overflow: auto;

firefox 1.0 displays the text significantly below the top of the div.
ie 6.0 renders it close to expected - the text is in the upper left
corner.

can anybody explain how i can get firefox to act as expected? what am
i doing wrong here?

tia...

Jul 21 '05 #1
5 8351
Hi,
<div id="logoHeader">
<h2>These boxes aren't so tough!</h2>
</div>
[...]
firefox 1.0 displays the text significantly below the top of the div.
ie 6.0 renders it close to expected - the text is in the upper left
corner.
can anybody explain how i can get firefox to act as expected? what am
i doing wrong here?

It's the top-margin of the h2. You can set ist margin-top:0;

Chris
Jul 21 '05 #2
Chris Leipold wrote:
Hi,
<div id="logoHeader">
<h2>These boxes aren't so tough!</h2>
</div>
[...]
firefox 1.0 displays the text significantly below the top of the div.
ie 6.0 renders it close to expected - the text is in the upper left
corner.
can anybody explain how i can get firefox to act as expected? what am
i doing wrong here?


It's the top-margin of the h2. You can set ist margin-top:0;


Though I imagine it'd be better to change the markup. What's the purpose
of having the h2 as the sole child of the div? Get rid of the div &
style h2.

--
Michael
m r o z a t u k g a t e w a y d o t n e t
Jul 21 '05 #3
Hi,
<div id="logoHeader">
<h2>These boxes aren't so tough!</h2>
</div>
[...]
firefox 1.0 displays the text significantly below the top of the div.
ie 6.0 renders it close to expected - the text is in the upper left
corner.
can anybody explain how i can get firefox to act as expected? what am
i doing wrong here?


It's the top-margin of the h2. You can set ist margin-top:0;


Though I imagine it'd be better to change the markup. What's the purpose
of having the h2 as the sole child of the div? Get rid of the div &
style h2.


I had the same situation a few weeks ago - and I had a good reason for
putting the h2 into a div - though I don't remember... It had something
to do with different backgrounds.

cheers
Chris
Jul 21 '05 #4

"skeeterbug" <js******@san.rr.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
i have the following code in my html page:

<div id="logoHeader">
<h2>These boxes aren't so tough!</h2>
</div>

i link to a style sheet with the following code:

@font-face {font-family: "Georgia"; SRC url(common/Georgia.TTF);}
Colon missing after SRC.


#logoHeader { position:absolute;
top: 1px;
left: 10px;
width: 760px;
height: 100px;
background: #F8F8F8;
padding-top: 1px;
padding-left: 1px;
padding-bottom: 1px;
padding-right: 1px;
padding: 0px;
border: 4px;
border-style: groove;
margin: 0px;
overflow: auto;
No closing brace.

Without further information, there's no way to know whether either of these
bugs is causing your problem. Would waste less time if you provided a URL to
the page instead of providing snippets that may not be exactly what you have
on your page.

firefox 1.0 displays the text significantly below the top of the div.
ie 6.0 renders it close to expected - the text is in the upper left
corner.

can anybody explain how i can get firefox to act as expected? what am
i doing wrong here?


Jul 21 '05 #5
all, thanks for your help. it solved the problem - and even solved
problems i didn't know i had! ;-)

Chris Leipold wrote:
Hi,
<div id="logoHeader">
<h2>These boxes aren't so tough!</h2>
</div>
[...]
firefox 1.0 displays the text significantly below the top of the div. ie 6.0 renders it close to expected - the text is in the upper left
corner.
can anybody explain how i can get firefox to act as expected? what am i doing wrong here?

It's the top-margin of the h2. You can set ist margin-top:0;

Chris


Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: books1999 | last post by:
Hi there, I have a problem with this css/div and i cannot work it out. I would like either container to be able to push the background box to grow but in Firefox it overflows. Can someone find a...
10
by: Lorenzo Thurman | last post by:
I have a table cell that I want to wrap text inside of. I've tried both hard and soft wrap, but Firefox refuses to obey. IE 6&7 handle the wrap just fine. Does anyone know how I can fix this?
5
by: givitumee | last post by:
I have a problem with my website: http://www.eecs.tufts.edu/~pgoran01/abet/ I'm using tabbed menus, all of them pop up when you login. However, the interface looks good in firefox but when I...
10
by: Phil Stanton | last post by:
I have a table of SpaceAreas eg Food Store, Garden Shed etc with the first and last bin for each Space Area defined. eg Food Store First Space 1, last space 26 and Gargen Shed First space 1, last...
1
by: mistahmiles | last post by:
I am designing a table-based menu. I want the table to take up the entire screen, as it is separating my banner image and the beginning of the text. Anyways, as you can see, I used the "width:100%"...
0
by: atarumorooka | last post by:
Hello, yes..it must be hard to try and help someone else coding but today is a full week of sadness and stress for IE CSS rendering and I need your help. Here you have a link that looks nice with...
5
by: Richard Maher | last post by:
Hi, Can someone please show me how to tell Firefox to preseve white-space when returning the selectList.option.value attribute? I have change the style so that the white-space is preserved on...
11
victorduwon
by: victorduwon | last post by:
Hey guys, I have built a suckerfish navigation menu using CSS and HTML with unordered lists. I was testing this menu in Safari, and it came out good. When I finished I tested it in firefox and...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.