简体   繁体   English

制作html菜单栏

[英]Making html menubar

Hey I am trying to make a topbar for my site as a navigation bar. 嘿,我正在尝试将我的网站的顶部栏作为导航栏。 This is what I get currently, how can I make it so that it's connected to the sides and to top. 这就是我目前得到的,我怎样才能使它连接到侧面和顶部。 I don't want that space between the page and the bar. 我不希望页面和栏之间有这个空格。 Sorry I am very beginner in this. 抱歉,我对此非常初级。 See this picture to see what my page looks like now http://i55.tinypic.com/dgnpro.png 看到这张图片,看看我的页面现在是什么样子http://i55.tinypic.com/dgnpro.png

My CSS code for bar 我的CSS代码吧

#topbar
{
    background-image:url(../images/topbar.png);
    background-repeat:repeat-x;
    width:100%;
    height:50px;

}

add on your css html, body {margin:0; padding:0;} 添加你的css html, body {margin:0; padding:0;} html, body {margin:0; padding:0;} This will make your bar to start of your page from the start without any space. html, body {margin:0; padding:0;}这将使您的栏从头开始没有任何空间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM