Why don’t you use a background image instead and use ‘background-size:cover’ to keep the image responsive. In that way you just need to create the 3 blocks as usual.
Background-size:cover preserves the aspect ratio while making sure the image fits the element completely. This is especially good when you have variable height text content because the space the text content needs will always be covered by the background image unlike your method of putting the text on top of the image because at some sizes the text will run off the image.
The difference with background-size is that the image will always fit the allocated space but it may mean that in order to do this the image is enlarged (while preserving the aspect ratio) so that the whole background is covered. This may result in some of the image being off screen in order for this to happen.
It is still the best method to do this effect however. Just try it and see
Otherwise you will need to absolutely place your text on top of the image and control the height explicitly.
I just worked it out (relatively speaking) using the foreground image and the absolute position method. Not very clean because I chose to disable bootscrap.min.css, but the centering works nicely. No changes to the HTML.
EDIT:
Got it. Had to disable the float on col-md-4. bootstrap.min.css restored
I think you have changed your code since the first post.
This is the working page that came up with. Most of my changes are in local styles at the bottom of the CSS. Be suspicious… I may have failed to move one or two down there.
There is ONE change to the HTML. I moved the large foreground image UP one level. Check the path to the image. That’s it.
Verify that the path to the foreground image is correct, then double-click the file to open it in your browser. What you see should match the screenshot. :fingers-crossed:
I thought this was good as other pages I need to create require vertical tabs and this also implements an accordion when you view the site on mobile devices.
So not sure If I have found the right tabs js, I have been searching for over 4 hours!
You might know of an easier plugin I can use that can acheive what I am after?
I tried to implement your code, but I can no longer click on the second tab or third tab to bring its content in (after un-commenting your code)
First. When you set the path to the image in the code that I posted, and opened the file in your browser, did the image in your browser match the screenshot?
The technique uses a foreground image to set the aspect ratio of the box.
I don’t remember you mentioning vertical tabs and accordions and the commented out code was essentially empty.
In any event, this is probably as far as I can go.