CSS Alignment of DIV's problem

R

rfq

I am just getting started on html and css. I have a very simple page.
There is a jpg image at the top of the page that is aligned left. Then
there are two DIV's created, the main div and a right hand navigation
bar div. I am having trouble getting the tops of both divs to align. I
can adjust the top margins for each div to render as aligned in Opera7
but then IE6 shows the main div slightly lower than the nav div. If I
adjust it to render in IE6 then it throws the Opera rendering off.

My HTML file places the image first and then lists the divs. I am
using relative positioning in the CSS file for these divs. Should I
use absolute positioning or am I missing something simple? Should I
nest the two divs inside one larger div?

Thanks,

RQ
 
N

Neal

I am just getting started on html and css. I have a very simple page.
There is a jpg image at the top of the page that is aligned left. Then
there are two DIV's created, the main div and a right hand navigation
bar div. I am having trouble getting the tops of both divs to align. I
can adjust the top margins for each div to render as aligned in Opera7
but then IE6 shows the main div slightly lower than the nav div. If I
adjust it to render in IE6 then it throws the Opera rendering off.

My HTML file places the image first and then lists the divs. I am
using relative positioning in the CSS file for these divs. Should I
use absolute positioning or am I missing something simple? Should I
nest the two divs inside one larger div?

This will require a URL for an example to get competent advice.
 
R

rfq

WebcastMaker said:
So simple that it lacks a URL


Actually yes sort of. I'm building it locally to replace my current
(and first) Frontpage mess at http://home.primus.ca/~rico.jd

I'm following my usual 'jack of all trades - master of none' behaviour
and am learning html and css from scratch while I do it and I haven't
really had the chance to upload it yet.

Since my original posting, I was able to solve the problem by putting
the header image into its own div container. Is there a performance
difference between putting the image in a div at the top vs. putting
it as a background image for the body element itself? There will be a
similar images on many pages in the site.

Advice taken however, and before posting another question (of which
there will undoubtedly be several) I will make sure to get it online
and post the link with my question.

Thanks for your responses.

RQ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,001
Messages
2,570,250
Members
46,848
Latest member
Graciela Mitchell

Latest Threads

Top