img float bug and mouse over 
October 20th, 2008, 12:35 PM
| | |
Hi.
On the http://skroc.pl/69d8 are images in the body (# singlepage), which
are given to float. The problem is that after mouse is over on them if
they flee the mouse (browser IE6 and 7). I tried to give elements of the
overriding zoom:1, but it does not give effect. How do I resolve this
problem? Maybe this particular bug in IE is something called.
--
Best regards,
Peter | 
October 21st, 2008, 04:45 AM
| | | | re: img float bug and mouse over
Peter May wrote: Quote:
>
On the http://skroc.pl/69d8 are images in the body (# singlepage), which
are given to float. The problem is that after mouse is over on them if
they flee the mouse (browser IE6 and 7).
| Part of the problem may be floating the image, but not the containing
<aelement. In Firefox, a mouseover on the image shows the :hover
colors in a narrow block within the text, between the words where the
<amarkup is. That can't be what you intended: http://www.bergamotus.ws/screenshots/powiatdrawski.png
I'm curious why those floated images are links in the first place - they
just link to themselves, not enlargements as I expected.
So first, try floating the <a>, not just <img>. IE has plenty of bugs
where it comes to floats, so that may not resolve this particular issue.
Adding position:relative to the floated element often helps.
You should also try simplifying the CSS. 41KB is a massive stylesheet.
You'll have a much easier task debugging a smaller file. KISS rules.
--
Berg | 
October 21st, 2008, 10:15 AM
| | | | re: img float bug and mouse over
Bergamot pisze: Quote:
Peter May wrote: Quote:
>On the http://skroc.pl/69d8 are images in the body (# singlepage), which
>are given to float. The problem is that after mouse is over on them if
>they flee the mouse (browser IE6 and 7).
| >
Part of the problem may be floating the image, but not the containing
<aelement. In Firefox, a mouseover on the image shows the :hover
colors in a narrow block within the text, between the words where the
<amarkup is. That can't be what you intended: http://www.bergamotus.ws/screenshots/powiatdrawski.png | Indeed, not noticed this effect. Quote:
I'm curious why those floated images are links in the first place - they
just link to themselves, not enlargements as I expected.
| It is very simple. A friend, who introduced the content, probably
brought bad image, because I agree with you that you should direct link
to original size image. Pay attention to it. Quote:
So first, try floating the <a>, not just <img>. IE has plenty of bugs
where it comes to floats, so that may not resolve this particular issue.
Adding position:relative to the floated element often helps.
| No to a small problem because the content is placed directly attributed
class alignright and alignleft to the image. You have to pay attention
to the fact that sometimes there is a picture alone, and sometimes as a
link.
Currently, I do not know what this can be done. I tried many methods
with position: relative, zoom: 1 and the other, but over my ideas. Quote:
You should also try simplifying the CSS. 41KB is a massive stylesheet.
You'll have a much easier task debugging a smaller file. KISS rules.
| I do not know what else can I shorten in the style sheet, but I can
always go further compressed. Consolation may be that CSS is loaded only
once, rather than every time you review the website.
--
Best regards,
Peter | 
October 21st, 2008, 11:15 AM
| | | | re: img float bug and mouse over
Bergamot pisze: Quote:
Peter May wrote: Quote:
>On the http://skroc.pl/69d8 are images in the body (# singlepage), which
>are given to float. The problem is that after mouse is over on them if
>they flee the mouse (browser IE6 and 7).
| >
Part of the problem may be floating the image, but not the containing
<aelement. In Firefox, a mouseover on the image shows the :hover
colors in a narrow block within the text, between the words where the
<amarkup is. That can't be what you intended: http://www.bergamotus.ws/screenshots/powiatdrawski.png | Still not solved this problem :-( Quote:
I'm curious why those floated images are links in the first place - they
just link to themselves, not enlargements as I expected.
>
So first, try floating the <a>, not just <img>. IE has plenty of bugs
where it comes to floats, so that may not resolve this particular issue.
Adding position:relative to the floated element often helps.
| I managed to fix the problem. It turned out that the removal of
position: relative to <asolved the problem. Strange, but it works
properly in IE.
--
Best regards,
Peter | 
October 21st, 2008, 05:35 PM
| | | | re: img float bug and mouse over
Peter May wrote: Quote:
Bergamot pisze:>
Still not solved this problem :-(
| That's because you're still floating just the image, not the <a>. Your
stylesheet adds padding and colored parts to the <a>, which don't go
away just because you floated the image. Float the <a>, not the image.
--
Berg | 
October 22nd, 2008, 10:15 AM
| | | | re: img float bug and mouse over
Bergamot pisze: Quote:
Peter May wrote: Quote: |
>Bergamot pisze:>Still not solved this problem :-(
| >
That's because you're still floating just the image, not the <a>. Your
stylesheet adds padding and colored parts to the <a>, which don't go
away just because you floated the image. Float the <a>, not the image.
| As I wrote, do not always do I add a float for <a>, because it is not
possible. It is placed on the content using CMS. In addition, the
picture is sometimes alone, sometimes as a link. Nevertheless, surely it
would be better if the link was set to float.
--
Best regards,
Peter |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,662 network members.
|