this question has answer here:
<!doctype html> <html> <head> <title>algoranker</title> <style type="text/css"> div.top{ width:100%; height:10%; text-align: center; color: white; background-color: #474747; } p{ margin-top: 0px; } html,body{ padding: 0; margin: 0; width: 100%; height: 100%; } </style> </head> <body > <div class="top" > <p>testing</p> </div> </body> </html> how make testing text in p tag vary according screen resolution tried using font-size:10%, not changing, 1 suggest me method
if want resize according screen width, i'd suggest vw unit.
fiddle: https://jsfiddle.net/tey035zv/
Comments
Post a Comment