[solved] Img behave different in Chome?
I have an issue with images:
They are above each other and I make one visible when hovering, this works just fine in any browser but Chrome.
In chrome for some reason they height is different.
They are the same size so that cant be it.
Is there a known issue? plss help Im still learning this ._.


31 Replies
please check out #How To Ask Good Questions, we can't help without any code to look at
https://codepen.io/Becii/pen/mdGzYMj
this works? I never used this before ^^
The images don't show up, but if you replace the HTML with this, it'll load some placeholders:
oh I see its weirdly moving this shouldnt happen
You can't link to images on your computer in Codepen
Use a placeholder image hosted online
the problem is you're absolutely positioning your second image, but not your first image
oh ok
best way to just pos both absolute and set a top I guess
Edit fiddle - JSFiddle - Code Playground
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
ideally you want to position the relative div using a regular layout method like flexbox
avoid absolute positioning for anything but special cases
I actually have that stuff in a gridsystem
ok then
you probably also want to add a transition to the opacity change so it's a bit smoother, but I guess you may have already done that 🙂
actually not Im so afraid of traansitions I did use them with my nav and I still dont quite get them but I will try ^^
which one would you recommmend?
not sure what you mean by which one
Edit fiddle - JSFiddle - Code Playground
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
just add
transition: opacity 500ms to your .p_img .p_img_fun classohhh
u are amazing ty
so how do I tag this solved now? Im such a noob xD
just sad it will be my dad Im using not this cute kitty q.q
have your dad hold a kitty
xD not good for a business website I think
ok I will implement it to the real file now and prey it works
you Germans are too serious 😹
Cats sell
although you could be austrian
in which case, entschuldigung 😄
Austrian but yes. I have nothing to say in this regard. hmm I broke something now q.q
ahaha
np used to it
my mother grew up in Austria, I have no excuse

waahh this will make me crazy one day xD
wow yeah that's not good 😄
your structure should be
its like its ignoring the grid?
does your code reflect that structure? ⬆️
I have both img in a div and that div is in the grid
when I have the img set to relative the grid works but the hover doesnt
when I have them on absoolute the hover works but the grid not
don't set the img to relative, set the div to relative
you want the images positioned relative to the div
div is relative, img absolute still broken
Im broken too q.q I was beeing to optimistic again
ok so my solution was playing around with ticking of and on the position attribute in F12, turns out if both pictures are absolute it breaks
only 1 is fine
it somehow magicly works now on chrome too
ty for your time @monimolimnion
Np