मैं अपने मां बैकपैकर्स व्यवसाय के लिए एक वेबसाइट तैयार करने की कोशिश कर रहा हूं। मेरी समस्या यह है कि मेरे बैनर छवि और मेरे navbar के बीच एक खाली सफेद रेखा है जिसे आप छवि में देख सकते हैं। मैंने सोचा कि यह मार्जिन के साथ करना है, इसलिए मैंने इसे दोनों तत्वों के लिए शून्य पर सेट नहीं किया है।मुझे अपने HTML तत्व के बीच सफेद जगह क्यों मिल रही है?
इसके अलावा दूसरा प्रश्न - मेरी ब्लैक बॉर्डर मुख्य सामग्री को क्यों कवर नहीं करती है? मैंने सोचा कि यह एक शरीर की पृष्ठभूमि के बाद से यह शरीर में हर तत्व के आसपास जाएगा।
मुझे एहसास हुआ कि समान प्रश्न हो सकते हैं लेकिन मुझे कहीं भी जवाब नहीं मिल रहा है। मैं किसी भी इनपुट की सराहना करूंगा - यह मेरी पहली पोस्ट है इसलिए मुझे खेद है कि अगर मैंने कोई स्वरूपण खराब कर दिया है।
मेरी वेबसाइट की छवि यहां पाया जा सकता:
http://postimage.org/image/20dhjcdb8/
अग्रिम धन्यवाद।
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="swaggersstyle.css">
<title>Oamaru Backpackers Hostel, Swaggers Backpackers - Home</title>
</head>
<body>
<img src="final.jpg" id="banner"></img>
<ul id="nav">
<li class="links"><a href="index.html">Home</a></li>
<li class="links"><a href="planning.html">Planning</a></li>
<li class="links"><a href="construction.html">Construction</a></li>
<li class="links"><a href="evaluation.html">Evaluation</a></li>
</ul>
<div id="mainc">
<p>Make Yourself at Home</p>
<p>Swaggers Backpackers is a converted old house located within walking distance of all the best parts of Oamaru. Explore the old victorian era buildings and shops of the city centre, or see the penguin colonies down the street. Swaggers is owned and operated by camp mum Agra, who makes all guests feel welcome, informed, and perhaps a bit mothered. </p>
</div>
</body>
</html>
और निम्नलिखित सीएसएस कोड:
मैं वर्तमान में मेरे index.html फ़ाइल में निम्न कोड है
html{
font-family: sans-serif;
background-color:#464E54;
}
body{
width: 960px;
margin: auto;
background-color: white;
border: 5px solid black;
}
#banner{
padding: 0px;
margin: 0;
}
#nav {
list-style-type: none;
padding: 0px;
margin: 0px;
overflow: hidden;
}
#mainc {
width: 960px;
float: right;
background-color: white;
margin: 0;
}
.links {
float: left;
margin: 0px;
}
a:link, a:visited {
display: block;
width: 232px;
font-weight: bold;
color: grey;
background-color: #dad8bf;
text-align: center;
padding: 4px;
text-decoration: none;
text-transform: uppercase;
margin-top: 0px;
}
a:hover, a:active{
background-color: #333333;
}
आप साइट प्रकाशित करें और हमें एक ऑनलाइन लिंक दे सकते हैं? –
http://pastebin.me/188842111b3069a3aa51932b1e021bd4 – sinelaw