Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
844 views
in Technique[技术] by (71.8m points)

html - Having trouble getting a new layout to work as desired in Bootstrap 4

I have a hyperlink in the figure caption on my project and the link only appears to work when in mobile view / or small screen where the columns collapse. For some reason, this issue isn't replicated on JFiddle but it is when I test on a variety of browsers and devices.

I discovered that with my old code, the paragraph's area was overlapping the hyperlink's hoverable clicking space, and making it impossible to click until the image would stack above on smaller screen/mobile in the old code.

**Old HTML** JFiddle: https://jsfiddle.net/LybeppL3/7/

Old HTML Desktop View Old HTML Mobile View

**So I tired a workaround**: see Current Code:           https://jsfiddle.net/5c2sm9s1/1/ 

OR @ PreemPrice.com

Specifically, I am trying now to break up a column for the picture on the right, the paragraphs of text to it's left, and when on mobile, that the picture stacks above the paragraphs of text and is centered.

However, my workaround does not look as nice/ not as responsive on mobile as my old code.

Nicer aesthetic in desktop for workaround The image scales down instead of maintaining its size as it did in the old code. And also looks pretty ugly as it does so. Another thing I don't like is that unlike the old code, this new code has the picture stacking below the paragraphs and not centered...

Specifically, I miss how in the "old" code, see JFiddle, it is really responsive in that the image keeps the same size, and once it's too big, it collapses over the text. In my current work-around, the photo shrinks uglily, and then stacks below instead of above the paragraphs.

Also, I miss how the image is fully centered at the top in mobile device in the old code.

I would appreciate help in getting this to work properly! Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...