You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Philip A. Chapman" <pc...@pcsw.us> on 2008/02/06 19:37:00 UTC

Trouble with IE and images loaded through css

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Guys,

Under the source dir that contains my page and html, I have two dirs,
css and images.  Inside css, I have two files, main.css and ie.css.
These css files reference images, such as:

main.css:

a.download-but{
	float:right;
	width:111px;
	height:26px;
	margin:0;
	background:url(../images/download-audio.png) no-repeat 0 0;
	text-indent:-9999px;
}

ie.css:

* html a.download-but{
	background:url(none.gif);
	filter:progid:dximagetransform.microsoft.alphaimageloader(src='images/download-audio.png',
sizingmethod='crop');
	cursor:pointer;
}

I have two links in the header.  mainCSS and ieCSS.  I have the
following code in the page:

WebClientInfo info =
(WebClientInfo)((WebSession)Session.get()).getClientInfo();
add(new StyleSheetReference("mainCSS", getClass(), "css/main.css"));
StyleSheetReference ssref = new StyleSheetReference("ieCSS", getClass(),
"css/ie.css");
add(ssref);
if
(!info.getProperties().getNavigatorAppName().equalsIgnoreCase("Microsoft
Internet Explorer")) {
            ssref.setVisible(false);
}

My problem is that under IE, the images are not loaded.  I've tried
changing the image url it ../images/download-audio.png, but that didn't
work.

Any suggestions?
- --
Philip A. Chapman

Desktop and Web Application Development:
Java, .NET, PostgreSQL, MySQL, MSSQL
Linux, Windows 2000, Windows XP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHqf5MAdpynRSGw3URAu+RAJ987XEjNuRFCpVHg8OWya99IsLlOQCfXQkI
leINHwBSkP9cKtF2VFWiOMQ=
=xUt9
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Trouble with IE and images loaded through css

Posted by Matej Knopp <ma...@gmail.com>.
You can have transparent pngs without alpha blending (1 bit
transparency). I believe IE6 supports that. It's useful if your images
need more than 255+1 color palette.

-Matej

On Feb 6, 2008 9:42 PM, Philip A. Chapman <pc...@pcsw.us> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Thanks Matej.  For now, I've converted to .gif until I can find a better
> solution.
>
> Matej Knopp wrote:
> > Hi,
> >
> > I'm affraid the url for alphaimageloader needs to be absolute. IE
> > can't handle relative urls for filters. That is a problem because in
> > wicket all you get are relative URLs. And you probably don't want to
> > tie your application to a specific context anyway.
> >
> > <rant>
> > I've personally have resigned to try to force IE6 to show transparent
> > pictures. I usually use two variants of each transparent picture - one
> > with alpha map for sane browsers and one with transparent color for
> > IE6. Hopefully won't be too long before IE6 share drops so low it
> > won't be worth supporting anymore.
> > </rant>
> >
> > -Matej
> >
> >
> >
> > On Feb 6, 2008 7:37 PM, Philip A. Chapman <pc...@pcsw.us> wrote:
>
> > Guys,
> >
> > Under the source dir that contains my page and html, I have two dirs,
> > css and images.  Inside css, I have two files, main.css and ie.css.
> > These css files reference images, such as:
> >
> > main.css:
> >
> > a.download-but{
> >         float:right;
> >         width:111px;
> >         height:26px;
> >         margin:0;
> >         background:url(../images/download-audio.png) no-repeat 0 0;
> >         text-indent:-9999px;
> > }
> >
> > ie.css:
> >
> > * html a.download-but{
> >         background:url(none.gif);
> >         filter:progid:dximagetransform.microsoft.alphaimageloader(src='images/download-audio.png',
> > sizingmethod='crop');
> >         cursor:pointer;
> > }
> >
> > I have two links in the header.  mainCSS and ieCSS.  I have the
> > following code in the page:
> >
> > WebClientInfo info =
> > (WebClientInfo)((WebSession)Session.get()).getClientInfo();
> > add(new StyleSheetReference("mainCSS", getClass(), "css/main.css"));
> > StyleSheetReference ssref = new StyleSheetReference("ieCSS", getClass(),
> > "css/ie.css");
> > add(ssref);
> > if
> > (!info.getProperties().getNavigatorAppName().equalsIgnoreCase("Microsoft
> > Internet Explorer")) {
> >             ssref.setVisible(false);
> > }
> >
> > My problem is that under IE, the images are not loaded.  I've tried
> > changing the image url it ../images/download-audio.png, but that didn't
> > work.
> >
> > Any suggestions?
> >>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
>
> - --
> Philip A. Chapman
>
> Desktop and Web Application Development:
> Java, .NET, PostgreSQL, MySQL, MSSQL
> Linux, Windows 2000, Windows XP
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHqhuZAdpynRSGw3URAj+sAJ9SQ8+Ym1799KtJ6SQ5Ypd0gsWtAACcCfl2
> EMHl3j7D/Av3ubI1bF1Pq/8=
> =Il1L
>
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Resizable and reorderable grid components.
http://www.inmethod.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Trouble with IE and images loaded through css

Posted by "Philip A. Chapman" <pc...@pcsw.us>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks Matej.  For now, I've converted to .gif until I can find a better
solution.

Matej Knopp wrote:
> Hi,
> 
> I'm affraid the url for alphaimageloader needs to be absolute. IE
> can't handle relative urls for filters. That is a problem because in
> wicket all you get are relative URLs. And you probably don't want to
> tie your application to a specific context anyway.
> 
> <rant>
> I've personally have resigned to try to force IE6 to show transparent
> pictures. I usually use two variants of each transparent picture - one
> with alpha map for sane browsers and one with transparent color for
> IE6. Hopefully won't be too long before IE6 share drops so low it
> won't be worth supporting anymore.
> </rant>
> 
> -Matej
> 
> 
> 
> On Feb 6, 2008 7:37 PM, Philip A. Chapman <pc...@pcsw.us> wrote:
> Guys,
> 
> Under the source dir that contains my page and html, I have two dirs,
> css and images.  Inside css, I have two files, main.css and ie.css.
> These css files reference images, such as:
> 
> main.css:
> 
> a.download-but{
>         float:right;
>         width:111px;
>         height:26px;
>         margin:0;
>         background:url(../images/download-audio.png) no-repeat 0 0;
>         text-indent:-9999px;
> }
> 
> ie.css:
> 
> * html a.download-but{
>         background:url(none.gif);
>         filter:progid:dximagetransform.microsoft.alphaimageloader(src='images/download-audio.png',
> sizingmethod='crop');
>         cursor:pointer;
> }
> 
> I have two links in the header.  mainCSS and ieCSS.  I have the
> following code in the page:
> 
> WebClientInfo info =
> (WebClientInfo)((WebSession)Session.get()).getClientInfo();
> add(new StyleSheetReference("mainCSS", getClass(), "css/main.css"));
> StyleSheetReference ssref = new StyleSheetReference("ieCSS", getClass(),
> "css/ie.css");
> add(ssref);
> if
> (!info.getProperties().getNavigatorAppName().equalsIgnoreCase("Microsoft
> Internet Explorer")) {
>             ssref.setVisible(false);
> }
> 
> My problem is that under IE, the images are not loaded.  I've tried
> changing the image url it ../images/download-audio.png, but that didn't
> work.
> 
> Any suggestions?
>>
- ---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
>>
>>

- --
Philip A. Chapman

Desktop and Web Application Development:
Java, .NET, PostgreSQL, MySQL, MSSQL
Linux, Windows 2000, Windows XP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHqhuZAdpynRSGw3URAj+sAJ9SQ8+Ym1799KtJ6SQ5Ypd0gsWtAACcCfl2
EMHl3j7D/Av3ubI1bF1Pq/8=
=Il1L
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Trouble with IE and images loaded through css

Posted by Matej Knopp <ma...@gmail.com>.
Hi,

I'm affraid the url for alphaimageloader needs to be absolute. IE
can't handle relative urls for filters. That is a problem because in
wicket all you get are relative URLs. And you probably don't want to
tie your application to a specific context anyway.

<rant>
I've personally have resigned to try to force IE6 to show transparent
pictures. I usually use two variants of each transparent picture - one
with alpha map for sane browsers and one with transparent color for
IE6. Hopefully won't be too long before IE6 share drops so low it
won't be worth supporting anymore.
</rant>

-Matej



On Feb 6, 2008 7:37 PM, Philip A. Chapman <pc...@pcsw.us> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Guys,
>
> Under the source dir that contains my page and html, I have two dirs,
> css and images.  Inside css, I have two files, main.css and ie.css.
> These css files reference images, such as:
>
> main.css:
>
> a.download-but{
>         float:right;
>         width:111px;
>         height:26px;
>         margin:0;
>         background:url(../images/download-audio.png) no-repeat 0 0;
>         text-indent:-9999px;
> }
>
> ie.css:
>
> * html a.download-but{
>         background:url(none.gif);
>         filter:progid:dximagetransform.microsoft.alphaimageloader(src='images/download-audio.png',
> sizingmethod='crop');
>         cursor:pointer;
> }
>
> I have two links in the header.  mainCSS and ieCSS.  I have the
> following code in the page:
>
> WebClientInfo info =
> (WebClientInfo)((WebSession)Session.get()).getClientInfo();
> add(new StyleSheetReference("mainCSS", getClass(), "css/main.css"));
> StyleSheetReference ssref = new StyleSheetReference("ieCSS", getClass(),
> "css/ie.css");
> add(ssref);
> if
> (!info.getProperties().getNavigatorAppName().equalsIgnoreCase("Microsoft
> Internet Explorer")) {
>             ssref.setVisible(false);
> }
>
> My problem is that under IE, the images are not loaded.  I've tried
> changing the image url it ../images/download-audio.png, but that didn't
> work.
>
> Any suggestions?
> - --
> Philip A. Chapman
>
> Desktop and Web Application Development:
> Java, .NET, PostgreSQL, MySQL, MSSQL
> Linux, Windows 2000, Windows XP
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHqf5MAdpynRSGw3URAu+RAJ987XEjNuRFCpVHg8OWya99IsLlOQCfXQkI
> leINHwBSkP9cKtF2VFWiOMQ=
> =xUt9
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Resizable and reorderable grid components.
http://www.inmethod.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org