div covers the whole width even though i limit the width
Hey guys I am trying to create sandwich menu button. I created the button and acheived what i needed to make but when i make the div a link the whole 100% width becomes a link how can i stop the div from covering the whole width? NOTE: I have added background color to highlight the background area thats covering the whole background witdh _____:HTML CODE:____ <!DOCTYPE> <html> <head> <title>image hosting</title> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body> <nav class="nav"> <a href="index.html"> <div></div> <div></div> <div></div> </a> </nav> </body> </html> _________________________ _____:STYLESHEET:________ body { margin: 0px; padding: 0px; border-style: none; } .sand { width: 40px; max-width: 40px; min-width: 35p; position: relative; } div { height: 7px; background-color:orange; width:35px; margin-top: 3px; padding: 1px; border-radius: 90px; } a { width: 40px; white-space: nowrap; } .nav { background-color: khaki; } _______________________________________________________