css - fixed html divs going over the edge -
i'm trying learn basic html&css , making simple webpage navbar, when fix header goes on right side of page.
<div id="header"> <table id="navbar"> <tr> <td>home</td> <td>about</td> </tr> </table> </div> #header { background-color: yellow; position: fixed; height: 35px; width: 100%; border-radius: 10px; border: 2px solid red}
how can fix this? thanks.
you need define spacing left , right.
here made fiddle: https://jsfiddle.net/yq6zoyhk/
#header { background-color: yellow; box-sizing: border-box; position: fixed; top: 0; left: 0; height: 35px; width: 100%; border-radius: 10px; border: 2px solid red}
Comments
Post a Comment