+ 2
why with my elements who can't adjust to the screen whether my code is wrong, please explain
complete see my code or my post https://code.sololearn.com/Wg2iVxICYAYR/?ref=app
7 odpowiedzi
+ 4
so everything has to be grouped and coded like img, the title must be arranged in html instead of CSS "position"
+ 3
Remove the width and height attribute in img elements in HTML
In CSS, add
img{
width:100%;
}
+ 3
Do you want to change my code, I've tried it but it's all messy
+ 2
example: I make a body width of 100vw and make a div with a width of 100% whether the div is equal to 100vw
+ 1
You are right, every thing messed up after setting the width of img
You'll need to build the responsiveness from the start, like these
https://code.sololearn.com/WrCC2w0Wmk4l/?ref=app
https://code.sololearn.com/W3gS00IGw160/?ref=app
+ 1
1. Your first step of setting width: 145px; height: 2010px; on body is already very very wrong.
.
Body should be margin 0 width 100vw min-height 100vh
2. Secondly, some of the elements is top left, some is top right, this makes the content splitted apart.
3. Build the body correctly, and then use three containers for title, banner and contents. Style their width as 100%
Style their height so that adding up is 100vh
+ 1
Child width / height % is relative to parent.
So If the div is direct child of body, then yes.