How do I get a div to fit to the screen with no oveflow in CSS

elmobitch27

New Member
\[code\]#topnavbar { width:100%; padding:0; border:1px solid gray; margin:0; } #topnavbar p { margin:0; } body { margin-left:auto; margin-right:auto; margin-top:0; width:1024px; }\[/code\]That is my code. How do I get it to have the bar(which is named topnavbar) to fit the whole screen without overflowing? And I don't want to do \[code\]overflow:hide;\[/code\] or whatever.
 
Top