jimleeder123 Posted February 10, 2016 Share Posted February 10, 2016 I want to have a list that has pictures on either side of each li. As the li gets bigger (more content), the images should stay in the middle of the li. I've tried numerous divs, before and after classes and gone a bit mad. Any ideas please? Quote Link to comment Share on other sites More sharing options...
maxxd Posted February 15, 2016 Share Posted February 15, 2016 Have you tried li{ position: relative; } li::before{ position: absolute; display: block; content: 'this is your content'; top: -50%; left :/* whatever */ transform: translateY(50%); } Theoretically, this should allow the content to remain at the mid-point of the li height regardless what that height is. May take a bit of tweaking, but it should get you started. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.