2015-10-19 33 views
1

首先让我说,我基本上对HTML或CSS没有任何认识,我只是喜欢乱搞。 其次,我讨厌固定标题,它似乎是那里的“新规则”,特别是在新闻和购物网站。所以我在Firefox中使用Stylish来使头部变为静态,特别是在头部可笑的大型网站中,我发现它在大多数情况下相当简单。例如for this site 我用在特定的站点中将头部固定为静态

@-moz-document domain('gigabyte.com') { 
    #div_main { 
     position: static !important; 
    } 
} 

我已经做了类似的事情,我经常光顾,并拥有所有网站,标题“太空垃圾”,但我不能得到它的工作for this site。对于这个问题,是否可以用时尚或其他方式改变它?

谢谢大家提前。

回答

0

你正在使用什么文本编辑器?因为即时通讯使用记事本+ +和我基本上建立一个头文件中的广告只是调用,在例如HTML代码的顶部:

header.php文件

<html> 

<head> 
</head> 

<body> 

<div class="login" style="width:101%;"> 
    Username: <input type="text" name="uname"><br> 
    Password: <input class="align" style="margin-left:3px;" type="password" name="pword"><br> 
    <input class="button" type="button" onclick = "location.href = 'registration.php'" name="signin" value="Sign In"> 
    <a href = "registration.php"><input class="button" type="button" name="register" value="Sign Up"></a> 
    <center> 
    <img src = "img/LOGO.jpg" style = "height: 80px; margin-top: -80px; width: 510px;"> 
    </center> 
</div> 

<center> 
<div class="nav"> 
    <ul> 
     <li><button onclick = "location.href = 'welcome.php'"><a href="welcome.php">Welcome</a></button></li> 
    </ul> 

    <ul> 
     <li><button onclick = "location.href = 'hotel.php'"><a href="hotel.php">Hotel</a></button></li> 
    </ul> 

    <ul> 
     <li><button onclick = "location.href = 'room.php'"><a href="Room.php">Rooms</a></button></li> 
    </ul> 

    <ul> 
     <li><button onclick = "location.href = 'contactus.php'"><a href="contactUs.php">Contact Us</a></button></li> 
    </ul> 

    <ul> 
     <li><button onclick = "location.href = 'gallery.php'"><a href="gallery.php">Gallery</a></button></li> 
    </ul> 
</div> 
</center> 

</body> 
</html> 

我用这个PHP代码调用该文件对我的其他网页:

<?php 
    include('templates/header.php'); 
?> 

我的头只是停留在页面顶部的我不知道,如果我知道你想发生什么,但是这是我的猜想希望它可以帮助FYI我只是个新手:)