why main tag floated right is not showing/working background-color properly without text in that.i want to create layout only. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

why main tag floated right is not showing/working background-color properly without text in that.i want to create layout only.

<!DOCTYPE html> <html> <head> <title>Page Title</title> <style> *{ margin:2px; } body { margin:5px; padding:0; box-sizing:border-box ; } header{ height:80px; width:100%; background-color:#273c75; } nav{ height:50px; width:100%; background-color:#7f8fa6; } article{ } aside{ height:70vh; width:27.5%; background-color:#44bd32; float:left; } main{ heigth:70vh; width:70%; background-color:#c23616; float:right; } footer{ height:50px; width:100%; background-color:#40739e; clear:both; } </style> </head> <body> <header> </header> <nav> </nav> <article> <aside id="a1"> </aside> <main> </main> </article> <footer> </footer> </body> </html>

26th May 2020, 11:02 AM
Divya Mohan
Divya Mohan - avatar
2 Answers
+ 1
Write your code in playground and share the link.
26th May 2020, 11:26 AM
Chetali Shah
Chetali Shah - avatar
26th May 2020, 11:36 AM
Divya Mohan
Divya Mohan - avatar