Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- CSS Alignment of DIV's problem
September 2, 2004, 2:23 pm
rate this thread
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?
Re: CSS Alignment of DIV's problem
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.