+ 1

Websites with a image background as a boarder

Im coding a website and was wondering what code this would be? Ive seen sites that have an image behind a white layout, I’ve tried flexboxes but they refuse to work m with my drop down navs. So what else should I use for this result. Example https://images.app.goo.gl/S1qFV8onxkDaQMHy9 I know how to add images to the code but not how to get the effect of a box over the top.

14th Oct 2022, 1:21 PM
Cat
2 Answers
+ 2
Border: 4rem solid url('img.png') Or Create a div with the background image of the image And insert a child div with background color: white; And set padding, setting the child element of the background image div hight and width to 80% Also for the background image div Do this Display: flex; Justify-content: center; Align-items:center;
16th Oct 2022, 10:48 AM
Daniel Nwachukwu Chigozirim
Daniel Nwachukwu Chigozirim - avatar
14th Oct 2022, 1:37 PM
Muhammad Hassan
Muhammad Hassan - avatar