How can I make the div with class=footer aligned to the center? Also how can i make the hr lines fade?... see description. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can I make the div with class=footer aligned to the center? Also how can i make the hr lines fade?... see description.

<!DOCTYPE html> <html> <head> <title>My Blog</title> <link href="new2.css" rel="stylesheet"> </head> <body> <div class="header"> <h2>ABOUT ME | <span> RESUME</span></h2> </div> <hr> <div class="name"> <h3>JESSICA PRICE</h3> </div> <p class="designation"> Creative Director and Designer</p> <hr> <div class="gif"> <img src="img3.jpg" alt="gif" class="center"> </div> <div class="section"> <h1><span>ABOUT ME</span></h1> <p> My paragraph </p> </div> <hr> <div class="footer"> <div style="width:100px; float:left; height:100px; ">FACEBOOK</div> <div style="width:100px; float:left; height:100px; ">|</div> <div style="width:100px; float:left; height:100px; ">INSTAGRAM</div> <div style="width:100px; float:left; height:100px; ">|</div> <div style="width:100px; float:left; height:100px; ">LINKEDIN</div> </div> </body> </html>

28th Sep 2020, 5:34 PM
Joshua Osogo
Joshua Osogo - avatar
4 Answers
+ 1
Hey there! This may not be a satisfactory answer because frankly I don't think I fully understand what you are asking for. But still.... First off why are you using <div class="header"> instead of <header> ? Same for the footer. You should use <footer> Instead of <div class="footer"> Anyways, for center alignment horizontally, footer { display: flex; justify-content: center; }
28th Sep 2020, 5:49 PM
Vatsal Sharma
Vatsal Sharma - avatar
0
Thanks sharma for the correction, am still learning by the way. Anyway let me try your suggestion
28th Sep 2020, 5:52 PM
Joshua Osogo
Joshua Osogo - avatar
0
👍
28th Sep 2020, 5:56 PM
Vatsal Sharma
Vatsal Sharma - avatar
0
Thanks it worked
28th Sep 2020, 6:01 PM
Joshua Osogo
Joshua Osogo - avatar