Modify ↓
Ticket #5587 (closed bug: invalid)
IE6 + IE7 IMG width()
| Reported by: | tsukasa1989 | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | unfiled | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Hello,
I'm trying to get the width() of an image. My code:
$(this).prevAll() .each(function(i) { alert($(this).width()); $offsetLeft += $(this).width(); }); In IE8 & FF i get the following result (for each alert):
- 94, 94, 94, 94
In IE6 & IE7 i get the following result (for each alert):
- 84, 84, 84
This is because i got margin: 0 5px; on my images. I think the function width() does not get the margins.
Greetings,
Tsukasa1989
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Can you attach a complete test case? That will help in diagnosing and fixing the problem.