Baggrundsbillede gentager sig ikke med repeat i CSS.
Kære eksperterJeg har et problem med min baggrundsbillede som ikke vil gentage sig når jeg bygger siden op i DIV'er. Når jeg bare skriver ren tekst inde i containeren vil baggrundsbilledet gerne gentage sig vertikalt, men ikke når containeren er fuld af DIV'ere... Det er som om at containeren slet ikek registrerer div'erne.
Jeg har læst en masse tutorialts og kan ikke se hvad jeg gør galt... håber der er en der kan hjælpe mig. Dette problem må være barnemad for jer ;)
Et andet lille spørgsmål. hvordan centrerer jeg siden (containeren)?
Her er koden: beklager hvis jeg har taget for meget med, men ved ikek helt hvordna I gerne vil have det præsenteret...
CSS:
@charset "UTF-8";
/* CSS Document */
<style type="text/css">
body {
margin-left:160px;
}
#container {
position:relative;
width:870px;
top:0px;
background-image: url("http://www.mediezonen.dk/2b/bg.gif");
background-repeat: repeat-y;
vertical-align: middle;
}
#logo {
position:absolute;
top:20px;
left:70px;
}
#bundmenu {
position:relative;
background-color:#000000;
color:#cdcdcd;
width:870px;
height:30px;
left:0px;
background-repeat: no-repeat;
}
#bundmenulinks {
position:absolute;
top:8px;
left:10px;
text-align: left;
width:850px;
}
a:link {
color:#cdcdcd;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
text-decoration: none;
font-style:strong;
line-height: 30px;
}
a:hover {
color:#cdcdcd;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style:strong;
text-decoration: underline;
}
a:visited {
color:#cdcdcd;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
text-decoration: none;
font-style:strong;;
}
a:active {
color:#cdcdcd;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
text-decoration: none;
font-style:strong;
}
h1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #000000;
margin-top: 10px;
}
h2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: normal;
margin-bottom: 5px;
margin-right: 10px;
margin-top: 10px;
margin-left: 10px;
}
h3 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
margin-bottom: 30px;
text-align: left;
margin-top: 30px;
margin-left: 30px;
}
h4 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: normal;
margin-bottom: 30px;
text-align: left;
margin-top: 30px;
margin-left: 30px;
margin-right:30px;
}
h5 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #000000;
margin-top: 30px;
}
#boks1 {
position:absolute;
top:110px;
left:205px;
width:190px;
height:190px;
background-color:#FFFFFF;
background-repeat: no-repeat;
text-align: center;
}
#boks2 {
position:absolute;
top:110px;
left:415px;
width:190px;
height:190px;
background-color:#FFFFFF;
background-repeat: no-repeat;
text-align: center;
}
#boks3 {
position:absolute;
top:110px;
left:625px;
width:190px;
height:190px;
background-color:#FFFFFF;
background-repeat: no-repeat;
text-align: center;
}
#boks4 {
position:absolute;
top:315px;
left:205px;
width:190px;
height:190px;
background-color:#FFFFFF;
background-repeat: no-repeat;
text-align: center;
}
#boks5 {
position:absolute;
top:315px;
left:415px;
width:190px;
height:190px;
background-color:#FFFFFF;
background-repeat: no-repeat;
text-align: center;
}
#boks6 {
position:absolute;
top:315px;
left:625px;
width:190px;
height:190px;
background-color:#FFFFFF;
background-repeat: no-repeat;
text-align: center;
}
#boks7 {
position:absolute;
top:530px;
left:205px;
width:610px;
background-color:#FFFFFF;
background-repeat: no-repeat;
text-align: left;
margin-left: 0px;
}
#spalte1 {
float:left;
width:70%;
padding-bottom: 20px;
}
#spalte2 {
float:left;
width:30%;
text-align:left;
margin-left:0;
}
#foto {
text-align:center; }
.containermenu {
position:absolute;
top:110px;
left:10px;
text-align: left;
width:150px;
}
</style>
HTML
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da">
<head>
<title>2b Security Systems</title>
<link href="2b.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container"><div id="spalte3"><img src="bg.gif" />
<div id="logo"><img src="2blogo.gif" alt="logo" /></div><br />
<div class="containermenu"><a href="/">Home</a><br />
<a href="/">About 2B</a><br />
<a href="/">Contact 2B</a><br />
<a href="/">Camera Housings</a><br />
<a href="/">Pan tilt Head</a><br />
<a href="/">Cctv lenses</a><br />
<a href="/">DVRs</a><br />
<a href="/">Video Matrix</a><br />
<a href="/">Cctv cameras</a><br />
<a href="/">Customer solution</a><br />
</div>
<div id="boks1">
<h1>CCTV systems export</h1>
<img src="pic_20.jpg" alt="CCTV" width="80" height="72" />
<h2>2B security system ship<br />
complete <strong>cctv systems</strong> and CCTV components <strong>worldwide</strong></h2>
</div>
<div id="boks2">
<h1>Power cctv zoom lenses</h1>
<img src="pic_16.jpg" alt="CCTV" width="100" height="56" />
<h2><br />
CCTV motorized zoom lenses, power zoom, manual zoom, CCTV mega pixel lenses...</h2>
</div>
<div id="boks3">
<h1>Pan tilt heads</h1>
<img src="pic_19.jpg" alt="CCTV" width="80" height="77" />
<h2>Heavy duty cctv pan/tilt,<br />
stainless steel, endless, <br />
marine, high speed...</h2>
</div>
<div id="boks4">
<h1>CCTV systems export</h1>
<img src="pic_20.jpg" alt="CCTV" width="80" height="72" />
<h2>2B security system ship complete <strong>cctv systems</strong> and CCTV components <strong>worldwide</strong></h2>
</div>
<div id="boks5">
<h1>Power cctv zoom lenses</h1>
<img src="pic_16.jpg" alt="CCTV" width="100" height="56" />
<h2><br />
CCTV motorized zoom lenses, power zoom, manual zoom, CCTV mega pixel lenses...</h2>
</div>
<div id="boks6">
<h1>Pan tilt heads</h1>
<img src="pic_19.jpg" alt="CCTV" width="80" height="77" />
<h2>Heavy duty cctv pan/tilt, stainless steel, endless, marine, high speed...</h2>
</div>
<div id="boks7">
<div id="spalte1">
<h3>CCTV systems from 2B Security Systems</h3>
<h4>2B delivers high quality cctv components world-wide and design cctv systems as border control cctv, Hot enviroment<br />
surveillance, Marine video systems, Long range applications and many others.<br />
<br />
In this site you will find:
<br />
<br />
CCTV zoom lenses, Pan tilt heads, camera housings, cctv cameras, DVRs, video matrix, video monitors, quads, ptz control, Video printers, IR illuminators, Video transmission, motorized lenses <br />
<br />
If you do not find the needed equipment in our site then please e-mail your specifications so we can check if we can help you.
<br />
<br />
Most viewed pages:jfklds</h4>
<p> </p>
<p> </p>
<p> </p>
</div>
<div id="spalte2">
<h3>Pan tilt heads</h3>
<div id="foto"><img src="pic_19.jpg" alt="CCTV" width="80" height="77" /></div>
<h4>Heavy duty cctv pan/tilt, stainless steel, endless, marine, high speed...</h4>
</div>
</div>
</div>
</div>
<div id="bundmenu"><div id="bundmenulinks"><a href="http://2bsecurity.com">links</a> | <a href="http://2bsecurity.com">links</a> | <a href="http://2bsecurity.com">links</a> | <a href="http://2bsecurity.com">links</a>|</div></div>
</body>
</html>
