Page 1 of 1

IE6 vs everything else - how to overlay menu on background img?

Posted: Tue May 23, 2006 1:46 pm
by mikemee
First I have to say that I've been emailing friends for days saying how I've finally found the tool for small business / brochure / family websites (and possibly far beyond!). CMSMS really rocks.

My problem is lack of CSS skills, methinks.  By sticking fairly closely to the supplied templates/scripts I built all but the front page of a client's site very quickly. But the front page was very specific and its taken some time.

The site is http://www.torreyhillsdentist.com and if you open it in IE6 Win and Firefox (or Safari) you'll see the problem  in IE but not Firefox.  (For reference, the original dreamweaver site I inherited is at old.torreyhillsdentist.com, which used javascript rollovers which looked nice but are a maintenance nightmare and fail SEO guidelines).

As you can see in Firefox, my goal is to place a vertical menu over an image on the front page which ties into the logo. After trying fruitlessly to leave the common logo and have an image below it tile perfectly, I switched to one large image and used it as the logo.  I.e.:

div#header h1 a {
            background:  url(uploads/images/img00ph.jpg) no-repeat 0 12px;
            height: 512px;


I soon found that I could tweak the

        div#header {
            height: 120px;
...

to put the menu over the top of the image and I was off and running.  For convenience, I overlayed a table and everything was running fine in both Firefox and Safari (couldn't get to the WinXP machine to test IE, though in hindsight I should have tried harder!).

On IE6, no matter what I try, I can't get any text to overlay the background image - unless its actually within the tags.

I'm hoping this is something really obvious and dumb.  Any help much appreciated!  Including a whole new approach if need be...  thanks in advance.

(Final thought, is it ok to 'overlay' stylesheets? E.g. I left the 'layout' stylesheet pretty standard and created a 'layout frontpage' where I ommitted all but the attributes I was changing such as the background 'logo' image. I vaguely recall that more recent settings override older ones, but I mention this just in case).

cheers, michael

Re: IE6 vs everything else - how to overlay menu on background img?

Posted: Tue May 23, 2006 9:46 pm
by mikemee
Bump ... help!  Even a quick "That'll never work but I don't have time to explain" would be useful. Or "try fiddling with ...". Or see my website, here, where I made this work, and copy my approach". Thanks!

Re: IE6 vs everything else - how to overlay menu on background img?

Posted: Tue May 23, 2006 10:22 pm
by hotaru
I'm not a CMSMS or CSS expert by any stretch, but since you sound desperate.  ;)

No idea if this relates to your problem or not, but I had something similar happen with content in tables in Internet Explorer (but not Firefox) when I had them aligned left. I also got a similar effect when FCKEditor had set the table or cell size as pixels rather than percentages, and was able to solve it by going in and changing that. Another thought related to tables - check the stylesheets for table padding and margins and see how big they are.

Ideally, of course, someone here could tell you how to do it without tables, but you *really* don't want me to try.  :)

-- Genevieve

Re: IE6 vs everything else - how to overlay menu on background img?

Posted: Wed May 24, 2006 1:29 am
by Dr.CSS
have you tried combining all the img. and putting them in the container div as a background or the pagewrapper.
the tables might be giving you a problem also, tables should really only be used for table data as in a price list like this...
http://www.multiintech.com/index.php?page=pricing_list ....
part of the problem with IE is that it takes some things literaly so if you start putting things on top of each other it will put them on the page one after the other not on top of each other...

    mark
if you need help converting to div let me know...

Re: IE6 vs everything else - how to overlay menu on background img?

Posted: Wed May 24, 2006 12:19 pm
by mikemee
Mark and Genevieve, thank you VERY much for your help.

The fix that worked was to put the background on the container div instead of the "h1 a" link. (I also combined the one remaining image into the background image while I was at it.)

I did continue to use a very simple table to offset the menu positioning. Hopefully that won't come back and bite me. However as its just for the front page and that's unlikely to change much, I'm quietly confident it will work well enough.

Thanks again for all your help!  (Now I'll go add another FAQ to help continue to 'pay back' the community here).

cheers, michael