html5 - Aligning links to the bottom of the navbar -
i having difficulties making links sit on bottom of navbar intended. ive attempted every trick think of, had no visible effect. 1 thing seemed shown down in example code below overlaps links , not know how fix this. advice on how fix or better way appreciated.
<!doctype html> <html> <head> <title></title> <style> * { margin: 0; padding:0; } .wrapper { background-color:green; height: 400px; } .navbar { position: relative; height: 50px; } .navbar { position: absolute; bottom: 0; } </style> </head> <body> <div class="wrapper"> <div class="navbar"> <a href="">link</a> <a href="">link</a> <a href="">link</a> <a href="">link</a> </div> </div> </body> <html>
css bit finicky positioning. first need give parent container position type. child containers follow depending on that.
* { margin: 0; padding:0; } .wrapper { background-color:green; height: 400px; position: relative; } .navbar { position: absolute; bottom:0; height: 50px; } .navbar { }
Comments
Post a Comment