2015-10-19 64 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我只是個新手:)