why with my elements who can't adjust to the screen whether my code is wrong, please explain | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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

7th Apr 2019, 8:59 AM
Avirur Rahman
Avirur Rahman - avatar
7 Answers
+ 4
so everything has to be grouped and coded like img, the title must be arranged in html instead of CSS "position"
7th Apr 2019, 12:32 PM
Avirur Rahman
Avirur Rahman - avatar
+ 3
Remove the width and height attribute in img elements in HTML In CSS, add img{ width:100%; }
7th Apr 2019, 9:54 AM
Gordon
Gordon - avatar
+ 3
Do you want to change my code, I've tried it but it's all messy
7th Apr 2019, 10:11 AM
Avirur Rahman
Avirur Rahman - avatar
+ 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
14th Apr 2019, 6:31 AM
Avirur Rahman
Avirur Rahman - avatar
+ 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
7th Apr 2019, 10:44 AM
Gordon
Gordon - avatar
+ 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
7th Apr 2019, 2:02 PM
Gordon
Gordon - avatar
+ 1
Child width / height % is relative to parent. So If the div is direct child of body, then yes.
14th Apr 2019, 9:54 AM
Gordon
Gordon - avatar