Forum Moderators: open

Message Too Old, No Replies

Images are coming out at the top of page in NN/Mozilla

but not in IE

         

reddevil

3:29 pm on Feb 2, 2004 (gmt 0)

10+ Year Member



Hi,
I have set up my webpage inside a table with <div> tabs surrounding the text paragraphs - there are three photos in a straight line in the middle of each text paragraph.

One of my pages looks fine in IE6.0 but in NN7.0 and Mozillla 1.6 the images are posotioned at the TOP of my pages (even before the start of the table). Therefore, my banner (which is contained within the table) comes after these images.

Does anybody know what I need to do to keep them in the correct position on the page?

Thanks.

Strange

3:55 pm on Feb 2, 2004 (gmt 0)

10+ Year Member



Do you have your div areas positioned on the page?

reddevil

4:56 pm on Feb 2, 2004 (gmt 0)

10+ Year Member



Hi strange,
I am fairly new to CSS and <divs> but my typical div would be something like:-

#content
{font-family: Comic Sans MS;
font-size: 10pt;
color: #0000FF;
line-height: 150%;
text-align: Left;
margin-right: 10px
}

Would this mean that my <divs> are positioned?
All my <divs> are contained within <td> in a table.
Cheers,

Strange

7:31 pm on Feb 2, 2004 (gmt 0)

10+ Year Member



Reddevil,

What I mean by positioning your div tags is this:

#content {
position: absolute; <--- Can be absolute or relative
left: 10px; <--- Distance from the left side
top: 20px; <--- Distance from the top
}

When an element is positioned absolutely, it stays exactly where you put it. When an element is positioned relativly, it is stays relative to the positiong it was placed.

I know that IE and Netscape tend to render CSS differently from one another, so I hope this helps you out.

tedster

4:03 am on Feb 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you validated your HTML with the W3C's validator?

[validator.w3.org...]

IE will often give a best guess when there are errors (especially table tag errors) where NN/Moz show the error more visibly.

reddevil

9:54 am on Feb 3, 2004 (gmt 0)

10+ Year Member



thanks for reminding me to revalidate tedster.
w3c showed me that my FP2000 had left the opening td tag open (eg. <td style etc etc> and now the images have moved back into the correct position.

Strange had mentioned that <div> should be positioned - should I do this with all <divs> as is use <divs> on my simple site basically just to formal the style and the <td> to position?

thanks again.

Strange

2:01 pm on Feb 3, 2004 (gmt 0)

10+ Year Member



Reddevil,

All divs do not have to be positioned. You only need to position divs that are part of your layout.

Think of a div area like a box. Within that box you can place information and format it any way you want. When you want to show the contents of that box to other people, you place the box where you want it to be seen.

You can also use a div area just to format the font of a block of text on the page. CSS overall is just meant to be used as a control for the visual presentation of a website.

Strange