Reputation: 189
So I have a fixed element that will be a picture that will vary in height, and I want to add text after it, but outside that div.
Example of what I need changed.
Because I need that hover not to include text, and if I put text outside the div of the picture, it naturally, end up at the beginning of the sidebar. So I need some solution to make it follow the picture, but without specifying height where it should start, because as I said height of the image will vary since I want to be able to put whatever image I want.
Upvotes: 0
Views: 174
Reputation: 622
Instead of current structure:
div#SidebarImg
div.LeftSlide
div.RightSlide
img
div#Description
Make something like:
div#SidebarImg
div#SlidesContainer
div.LeftSlide
div.RightSlide
img
div#Description
The #Description div is now outside of the image-and-slides part, so now the #SlidesContainer img:hover #RightSlide {...}
selector should work
Upvotes: 2