Ik ben een beginnend css gebruiker en ben nu bezig met iets mbv volgende site:
http://bluerobot.com/web/layouts/layout3.html
Hun files gebruikend ben ik dus eea aant proberen en van bovenstaande layout wil ik of heb ik een header bijgevoegd.
Nu komt het irritante, in IE gaat alles een beetje naar boven en het menu overlapt de header zowat, maar in FF is ie OK.
Ik heb zowat uren zitten klooien met van alles wat ik maar kan bedenken en gezien heb op google, zoals inline dingen, margins, paddings, wrappers etc, maar helaas.
HTML:
CSS:
Wie weet waaraan dit ligt??
http://bluerobot.com/web/layouts/layout3.html
Hun files gebruikend ben ik dus eea aant proberen en van bovenstaande layout wil ik of heb ik een header bijgevoegd.
Nu komt het irritante, in IE gaat alles een beetje naar boven en het menu overlapt de header zowat, maar in FF is ie OK.
Ik heb zowat uren zitten klooien met van alles wat ik maar kan bedenken en gezien heb op google, zoals inline dingen, margins, paddings, wrappers etc, maar helaas.
HTML:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| <!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>
<title>Test</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="setHeight.js"></script>
</head>
<body>
<div id="header" ><h1>Site Header</h1></div>
<div id="navAlpha" class="column" style="width: 232px">
<l>
<ul><a href="">Link1</a></ul>
<ul><a href="">Link2</a></ul>
<ul><a href="">Link3</a></ul>
<ul><a href="">Link4</a></ul>
<ul><a href="">Link5</a></ul>
<ul><a href="style.css">Bekijk css file</a></ul>
</div>
<div id="content">
Hier is een content header
</div>
<div id="content" class="column">
Hier komt content. Hier komt content.Hier komt content.Hier komt content.Hier komt content.
Hier komt content.Hier komt content.Hier komt content.Hier komt content.Hier komt content.
Hier komt content.Hier komt content.Hier komt content.Hier komt content.Hier komt content.
Hier komt content.Hier komt content.Hier komt content.Hier komt content.Hier komt content.
Hier komt content.Hier komt content.Hier komt content.Hier komt content.Hier komt content.
Hier komt content.Hier komt content.Hier komt content.Hier komt content.Hier komt content.
Hier komt content.Hier komt content.Hier komt content.Hier komt content.Hier komt content.
Hier komt content.Hier komt content.Hier komt content.Hier komt content.Hier komt content.
Hier komt content.Hier komt content.Hier komt content.Hier komt content.Hier komt content.
</div>
</body>
</html> |
CSS:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
| body {
color:#333;
background-color:#DE2139;
margin:20px;
padding:0px;
font:11px verdana, arial, helvetica, sans-serif;
}
h1
{
margin: 0px 0px 10px 0px;
padding: 0px;
font-size: 30px;
font-weight: bold;
color: #330000;
font-family: 'Bodoni MT Black';
}
h2 {
font:bold 12px/14px verdana, arial, helvetica, sans-serif;
margin:0px 0px 5px 0px;
padding:0px;
}
p {
font:11px/20px verdana, arial, helvetica, sans-serif;
margin:0px 0px 16px 0px;
padding:0px;
}
.textbox {
font-family: Verdana, Tahoma;
border: black thin solid;
background-color: #fff5ee;
font-size: small;
}
.button {
font-family: Verdana, Tahoma;
border: black thin solid;
background-color: #fff5ee;
font-size: small;
}
.dropdownmenu {
font-family: Verdana, Tahoma;
border: black thin solid;
background-color: #fff5ee;
font-size: small;
}
#header {
margin:20px 100px 10px 0px;
padding:17px 0px 0px 20px;
/* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */
height:33px; /* 14px + 17px + 2px = 33px */
border-style:solid;
border-color:black;
border-width:1px 1px; /* top and bottom borders: 1px; left and right borders: 0px */
line-height:1px;
background-color:#eee;
/* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity.
Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it.
IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style
declaration. The incorrect IE5/Win value is above, while the correct value is
below. See http://glish.com/css/hacks.asp for details. */
voice-family: "\"}\"";
voice-family:inherit;
height:14px; /* the correct height */
}
/* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct
length values to user agents that exhibit the parsing error exploited above yet get
the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include
a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */
body>#Header {height:14px;}
#Content>p {margin:0px;}
#Content>p+p {text-indent:30px;}
a {
color:#09c;
font-size:11px;
font-family:verdana, arial, helvetica, sans-serif;
text-decoration:none;
}
a:link {color:#09c;}
a:visited {color:#07a;}
/* All the content boxes belong to the content class. */
#content
{
/* position:relative; Position is declared "relative" to gain control of stacking order (z-index).
width:auto;
min-width:120px;
margin:0px 210px 20px 170px;
border:1px solid black;
background-color:white;
padding:10px;
z-index:3; This allows the content to overlap the right menu in narrow windows in good browsers. */
position:relative; /* Position is declared "relative" to gain control of stacking order (z-index). */
width:auto;
min-width:120px;
margin:0px 100px 20px 270px;
border:1px solid black;
background-color:white;
padding:10px;
}
#navAlpha
{
position: absolute;
float:left;
top:63px;
left:20px;
width:auto;
padding:10px;
margin:0px 0px 20px 0px;
background-color:#eee;
border:1px dashed #999;
z-index:2;
display:inline;
background-image: url(images/menuback.gif);
/* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity.
Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it.
IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style
declaration. The incorrect IE5/Win value is above, while the correct value is
below. See http://glish.com/css/hacks.asp for details. */
voice-family: "\"}\"";
voice-family:inherit;
width:150px;
}
/* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct
length values to user agents that exhibit the parsing error exploited above yet get
the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include
a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */
body>.navAlpha {width:auto;} |
Wie weet waaraan dit ligt??