+ 1

Is it possible to build a responsive web design by using area tag element?

4th Jul 2021, 7:49 AM
Adi Pratama
Adi Pratama - avatar
12 Respostas
+ 2
Adi Pratama, S.Kom. mostly "according to image size"... area 'coords' attributes must be specified in css pixels unit, in html... even if you define image size "according to @media css width": so, if you change viewport size, then image size will change, and 'coords' attributes of area element must be updated... wich is only possible with js ;P Divya Mohan area element itself not help to built responsive page, but should be handled when building responsive page: if related image size change according to viewport size (responsiveness) then area 'coords' attribute have to be updated accordingly ;)
4th Jul 2021, 2:00 PM
visph
visph - avatar
+ 2
I also thought that area tag element easier than manual css adjustment because we can use percentage unit, But area only accept %
4th Jul 2021, 4:35 PM
Adi Pratama
Adi Pratama - avatar
+ 2
Thank you
4th Jul 2021, 10:41 PM
Adi Pratama
Adi Pratama - avatar
+ 1
only by using js to dynamically update "coords" attribute content accordingly to the image size ^^
4th Jul 2021, 7:55 AM
visph
visph - avatar
+ 1
Divya Mohan area 'coords' attribute must be given in css pixels unit: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area
4th Jul 2021, 3:23 PM
visph
visph - avatar
+ 1
Adi Pratama, S.Kom. not necessarly: by using split image+anchor href+css @media width could be hard to fine layout and can quite only handle rectangular areas ^^ however, if you only need js to handle this purpose on your site (and even if you're not much skilled with js), it may be a food choice to avoid js (wich could ever be disabled by user, even if that's nowadays a low probable case) ;P
4th Jul 2021, 4:35 PM
visph
visph - avatar
+ 1
Adi Pratama, S.Kom. area 'coords' attribute only accept css pixels unit, not %
4th Jul 2021, 4:37 PM
visph
visph - avatar
0
Area tag use to define an area on an image map. It will not help to built responsive page.
4th Jul 2021, 9:42 AM
Divya Mohan
Divya Mohan - avatar
0
Which one is true? According to image size or according to @media css width?
4th Jul 2021, 12:12 PM
Adi Pratama
Adi Pratama - avatar
0
visph I don't think so bcz responsive mean aspect is not changing and if aspect of image is not changing and area is in% unit no need to worry about it.
4th Jul 2021, 3:19 PM
Divya Mohan
Divya Mohan - avatar
0
Hmmm đŸ€” yes... You are right visph My bad , i forgot its unit is px fixed
4th Jul 2021, 3:32 PM
Divya Mohan
Divya Mohan - avatar
0
I think, build a responsive web using original image+area+js is more difficult than using split crop image+anchor href+css @media width
4th Jul 2021, 4:28 PM
Adi Pratama
Adi Pratama - avatar