Ik werk met Namo editor 3 (!) en ik wil twee achtergrondafbeeldingen als achtergrond; eentje als kop en daaronder eentje die zichzelf steeds horizontaal herhaalt.
Ik heb gezocht op internet en kom o.a. deze tegen:
html { background:url(farthest.png) 0% 0% repeat-x; }
body { background:url(nearest.png) 0% 0% repeat-y; }
en:
en:
maar ik krijg ze niet werkend. Ligt dat aan mijn oude webeditor of aan het feit dat ik het niet juist doe?
En hoe moet het dan wel?
Ik heb gezocht op internet en kom o.a. deze tegen:
html { background:url(farthest.png) 0% 0% repeat-x; }
body { background:url(nearest.png) 0% 0% repeat-y; }
en:
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Double Backgrounds with CSS - CSS/XHTML Tutorial by Soh Tanaka</title>
<style type="text/css">
body {
margin: 0;
padding: 0;
background: #e5e5e5 url(bg_body.gif) repeat-x;
position: relative;
}
#bg_wrap {
height: 96px;
width: 50%;
right: 0;
background: url(bg_wrap.gif) repeat-x;
position: absolute;
}
.container {
width: 960px;
background: #e5e5e5;
margin: 0 auto;
overflow: hidden;
position: relative;
}
</style>
</head>
<body>
<div id="bg_wrap"></div>
<div class="container">
<img src="header.gif" alt="" />
</div>
</body>
</html>
Code:
html {
background: url(images/back_color.png);
height: 100%;
}
body {
background: url(images/back.png) repeat-x;
margin: 0;
padding: 0;
height: 100%;
}
html>body {
min-height: 100%;
height: auto;
}
En hoe moet het dan wel?
Laatst bewerkt door een moderator: