This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > April 2007 > IE CSS image overlap





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author IE CSS image overlap
Seth Illgard

2007-04-05, 6:18 pm

Hi, Im writting a custom CMS and everything looks great, except when I
see the results in IE. What im trying to do is:

*Have an image in a layer (or relative positioned, or just margined).
The exact image's coordinates depends in the window size (Fluid
design)

*The image should display correctly in front(above) another image
(header image)

*The image should link to another site (<a href> )

I have tryed:

*Set the image position to "relative" and move it from its original
position. Seems like te better option to me, but the problem is that
the content below the image acts like if the image would still be
there (static positioned). That results in an awful white space in the
design (a hole).

*Set the image position to absolute. Not working because when I resize
the window, the image wont be in the correct position anymore.

*Let the image be in position: static, and fix its position using
margins. Worked! Except on IE 6 and 7 where the image tries to display
itself below the other image i mentioned (he header image). I need the
image to show above the header, not below it. Tryed to adjust CSS
styles like "overflow" and "zIndex". None worked.

And, the other problem is that when I set the <a href> of the image,
all browsers except from ophera show an awful blue(purple?) margin
around the image. This dissapears when i dont set the <a> tag around
the image.

Here is the XHTML code generated by my CMS (The layout table is from
the template, designed in dreamweaver) :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns=3D'http://
www.w3.org/1999/xhtml'><head><title>BlueCore</title><meta http-
equiv=3D'expires' content=3D'-1' /><meta http-equiv=3D'pragma' content=3D'n=
o-
cache' /><meta http-equiv=3D'Content-Type' content=3D'text/html;
charset=3Diso-8859-1' /><style type=3D"text/css">
<!--
body {
background-color: #000000;
}
=2Edefault {color: #FFFFFF}
=2Elateral {
color: #000000;
font-size: 12px;
margin: 10px;
padding: 10px;
}
-->
</style><script type=3D'text/javascript' languaje=3D'javascript'
src=3D'../../bluecore/sistema/javascript/mootools.js'></script><script
type=3D'text/javascript' languaje=3D'javascript' src=3D'../../bluecore/
sistema/javascript/swfobject.js'></script><script type=3D'text/
javascript' languaje=3D'javascript' src=3D'../../bluecore/sistema/
javascript/pngIe6Fix.js'></script><script type=3D"text/javascript"
languaje=3D"javascript">window.addEvent("domready", function(){new
Png();});</script></head><body>

<div align=3D"center">
<table width=3D"800" border=3D"0" cellpadding=3D"0" cellspacing=3D"0">
<!--DWLayoutTable-->
<tr>
<!--THIS IS THE HEADER IMAGE-->
<td height=3D"182" colspan=3D"2" valign=3D"top"><span
class=3D"default"><div style=3D'width: 800px;height: 208px;z-index:
-1;'><img src=3D'../../bluecore/sistema/panel/diseno/bluecore/imagenes/
cabecera.jpg' width=3D'800' height=3D'208' /></div></span> </td>

</tr>
<tr>
<td width=3D"227" height=3D"584" valign=3D"top" bgcolor=3D"#B3F4FF">
<!--AND THIS IS THE IMAGE I WANT ABOVE THE HEADER IMAGE-->
<div style=3D'width: 53px;height: 61px;position: relative;margin-
left: 120px;margin-top: -45px;z-index: 10000;overflow: visible;'><a
href=3D'http://www.google.com' target=3D'_self'><img src=3D'../../bluecore/
sistema/panel/diseno/bluecore/imagenes/www.png' width=3D'53'
height=3D'61' /></a></div>
<div align=3D"right">
<p align=3D"right" class=3D"lateral"><font face=3D"Geneva, Arial,
Helvetica, sans-serif"><strong>Para empezar seleccione una opci=F3n del
men=FA</strong></font></p>
</div></td>
<td width=3D"573" valign=3D"top"><span class=3D"default">{Contenido}=
</
span></td>

</tr>
</table>
</div></body></html>

By the way, you can check the progress of the CMS in http://bluecorecms.blo=
gspot.com

Thank you very much in advance. Im not good at all at those Browser
Quirks and CSS.

Seth Illgard

2007-04-05, 6:18 pm

On Apr 5, 11:47 am, "Seth Illgard" <Seth.Illg...@XXXXXXXXXX> wrote:
> Hi, Im writting a custom CMS and everything looks great, except when I
> see the results in IE. What im trying to do is:
>
> *Have an image in a layer (or relative positioned, or just margined).
> The exact image's coordinates depends in the window size (Fluid
> design)
>
> *The image should display correctly in front(above) another image
> (header image)
>
> *The image should link to another site (<a href> )
>
> I have tryed:
>
> *Set the image position to "relative" and move it from its original
> position. Seems like te better option to me, but the problem is that
> the content below the image acts like if the image would still be
> there (static positioned). That results in an awful white space in the
> design (a hole).
>
> *Set the image position to absolute. Not working because when I resize
> the window, the image wont be in the correct position anymore.
>
> *Let the image be in position: static, and fix its position using
> margins. Worked! Except on IE 6 and 7 where the image tries to display
> itself below the other image i mentioned (he header image). I need the
> image to show above the header, not below it. Tryed to adjust CSS
> styles like "overflow" and "zIndex". None worked.
>
> And, the other problem is that when I set the <a href> of the image,
> all browsers except from ophera show an awful blue(purple?) margin
> around the image. This dissapears when i dont set the <a> tag around
> the image.
>
> Here is the XHTML code generated by my CMS (The layout table is from
> the template, designed in dreamweaver) :
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ww=

w=2Ew3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns=3D'http://www=
..w3.org/1999/xhtml'><head><title>BlueCore</title><meta http-
> equiv=3D'expires' content=3D'-1' /><meta http-equiv=3D'pragma' content=3D=

'no-
> cache' /><meta http-equiv=3D'Content-Type' content=3D'text/html;
> charset=3Diso-8859-1' /><style type=3D"text/css">
> <!--
> body {
> background-color: #000000;
> }
> .default {color: #FFFFFF}
> .lateral {
> color: #000000;
> font-size: 12px;
> margin: 10px;
> padding: 10px;
> }
> -->
> </style><script type=3D'text/javascript' languaje=3D'javascript'
> src=3D'../../bluecore/sistema/javascript/mootools.js'></script><script
> type=3D'text/javascript' languaje=3D'javascript' src=3D'../../bluecore/
> sistema/javascript/swfobject.js'></script><script type=3D'text/
> javascript' languaje=3D'javascript' src=3D'../../bluecore/sistema/
> javascript/pngIe6Fix.js'></script><script type=3D"text/javascript"
> languaje=3D"javascript">window.addEvent("domready", function(){new
> Png();});</script></head><body>
>
> <div align=3D"center">
> <table width=3D"800" border=3D"0" cellpadding=3D"0" cellspacing=3D"0">
> <!--DWLayoutTable-->
> <tr>
> <!--THIS IS THE HEADER IMAGE-->
> <td height=3D"182" colspan=3D"2" valign=3D"top"><span
> class=3D"default"><div style=3D'width: 800px;height: 208px;z-index:
> -1;'><img src=3D'../../bluecore/sistema/panel/diseno/bluecore/imagenes/
> cabecera.jpg' width=3D'800' height=3D'208' /></div></span> </td>
>
> </tr>
> <tr>
> <td width=3D"227" height=3D"584" valign=3D"top" bgcolor=3D"#B3F4FF=

">
> <!--AND THIS IS THE IMAGE I WANT ABOVE THE HEADER IMAGE-->
> <div style=3D'width: 53px;height: 61px;position: relative=

;margin-
> left: 120px;margin-top: -45px;z-index: 10000;overflow: visible;'><a
> href=3D'http://www.google.com'target=3D'_self'><img src=3D'../../bluecore/
> sistema/panel/diseno/bluecore/imagenes/www.png'width=3D'53'
> height=3D'61' /></a></div>
> <div align=3D"right">
> <p align=3D"right" class=3D"lateral"><font face=3D"Geneva, Arial,
> Helvetica, sans-serif"><strong>Para empezar seleccione una opci=F3n del
> men=FA</strong></font></p>
> </div></td>
> <td width=3D"573" valign=3D"top"><span class=3D"default">{Contenid=

o}</
> span></td>
>
> </tr>
> </table>
> </div></body></html>
>
> By the way, you can check the progress of the CMS inhttp://bluecorecms.bl=

ogspot.com
>
> Thank you very much in advance. Im not good at all at those Browser
> Quirks and CSS.


I forgot to say that the header image is a jpg and the image that im
tryng to position is a png image. Does this have something to do with
IE lack of support for pngs?

Jukka K. Korpela

2007-04-05, 6:18 pm

Scripsit Seth Illgard:

> I forgot


You forgot to post the URL and to learn how to quote on Usenet.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Seth Illgard

2007-04-05, 6:18 pm

On Apr 5, 12:58 pm, "Jukka K. Korpela" <jkorp...@cs.tut.fi> wrote:
> Scripsit Seth Illgard:
>
>
> You forgot to post the URL and to learn how to quote on Usenet.
>
> --
> Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/


Hey, no need for being agressive. I have no URL, I simply cant
liberate a still buggy system. It chanes everyday and I dont have a
stable version yet. So, the better I can do is show you the code
generated.

You are right. I dont know how to quote on the Usenet. Ill investigate
this right on.

On the other hand. I solved the link problem just adding "border='0'"
to the image tag. Hope it helps others.

Ill do my best to get a PHP host and upload a functional demo.

Thanks for your.....help.

Seth Illgard

2007-04-05, 6:18 pm


> You forgot to post the URL and to learn how to quote on Usenet.


Hey, no need for being agressive. I have no URL, I simply cant
liberate a still buggy system. It changes everyday and I dont have a
stable version yet. So, the better I can do is show you the code
generated.

As you can see, thanks to your....advice...I learned how to quote on
the usenet. Google groups hides the quoted text so I didn=B4t saw a
problem the first time I quoted. Now I see your point.

On the other hand. I solved the link problem just adding "border=3D'0'"
to the image tag. Hope it helps others.

Ill do my best to get a PHP host and upload a functional demo.

Thanks for your.....help.

Bergamot

2007-04-05, 6:18 pm

Seth Illgard wrote:
>
> I have no URL
> Ill do my best to get a PHP host and upload a functional demo.


You don't need to go that far. You apparently have the generated code.
Save that as a web page and upload it to a publicly accessible server.
If the real domain isn't public, try your ISP. Most give some free space
to their users. There's even yahoo/geocities if you're desperate.

--
Berg
Seth Illgard

2007-04-05, 6:18 pm

> You apparently have the generated code.


Hehehe, so stupid I am. I just realized that and I quickly deleted my
last message so nobody will notice my stupidity.

Well, actually, two great news:

1: Got a host. A friend of mine created a subdomain for me.
URL: http://www.bluecore.alterwaremedia.com/

2.- Problem solved. I used a relative postioning. And a "border='0'"
on the image tag t correct the link.

IE seems to take the image from the center (as all the table is
centered) while other browsers take it from the left of the cell.
Check the URL in IE and in FF.


Thanks for the help.


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews