I tried to add the little orange box with :after and :before, but it didn't work 😕...
Any tips for improvement are very appreciated!
I tried to add the little orange box with :after and :before, but it didn't work 😕...
Any tips for improvement are very appreciated!
Hi Anahita, you can place the orange box with absolute positioning. An element with "position: absolute;" is positioned relative to the nearest positioned ancestor.
<div class="relative"> <div class="absolute"> </div> </div>div.relative { position: relative; width: 400px; height: 200px; border: 3px solid #73AD21; }
div.absolute { position: absolute; top: 80px; right: 0; width: 200px; height: 100px; border: 3px solid #73AD21; }
You can set the absolut position with left, top, right, bottom values.
I hope you can use my advice.
This is my solution for the Article Preview Component.
It was overall easy and enjoyable building this project, however I faced some difficulties regarding the toolbar:
.share-btn
to the mobile responsive toolbar to match the exact pattern. It might be easy to exit the toolbar in any case, however it would be even better to match the exact pattern.I would appreciate your feedback and would like to receive your comments and perspectives regarding the project. Thanks a lot!
Hi, first of all, congratulations on your solution. The triangle you mentioned is a square, rotated by 45 degrees and in absolute position to the rectangle of the same colour. This square will be "hidden" in the mobile version. In the mobile version the arrow is placed on the layer above the rectangle, you can set this with the "z-index" value. In my case, the rectangle disappears when the visitor either clicks on the icons or other areas of the page. I would appreciate your feedback on whether my comment was helpful.