[html & css] raar probleem met float en a:hover

Pagina: 1
Acties:

  • wilcodl
  • Registratie: September 2004
  • Laatst online: 30-03 22:55
hallo tweakers,
ik 2 vreemde problemen met het opbouwen van een website.
Hier kunnen jullie een voorbeeld zien: http://81.206.236.112/test
De problemen doen zich alleen voor in ie 6.0
Het eerste probleem:
in het gele gebied staat op de beginpagina een tekst, deze tekst lijkt een padding-left te hebben, maar dat is niet zo! Als je verder naar onder kijkt zie je dat dat ook niet zo is. Dit heeft te maken met het menu aan de linkerkant van de pagina, die is gefloat met float: left. Nu is mijn vraag: hoe kan het dat de tekst naast het menu een padding lijkt te hebben?
Het 2e probleem:
Op http://81.206.236.112/test/index.php?page=home2 staat onderaan het gele gebied een link, als je hier over heen gaat verdwijnt een gedeelte van het menu aan de linkerkant!! Als ik in style.css bij a:hover de regel font-weight: bold; verwijder is er niks aan de hand!!!

Hier de html code:
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
   <title>CPJ Middelstum</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="style.css">
</head>

<body>

<div id="top">
[img]"images/header_left.gif"[/img]

</div>

<div id="left">

<div class="head">
Menu:
</div>
<div class="content">
- <a href="index.php?page=home">Home</a><br>
- <a href="index.php?page=home2">Home2</a><br>
</div>

<div class="head">
Info:
</div>
<div class="content">
- 1 bezoeker online<br>
- Aantal bezoekers:<br>
&nbsp; 16838<br>
- Last update:<br>
&nbsp; 23-01-2006</div>

<div class="head">
Partners:
</div>
<div class="content">
Hier komen wat links enzo<br><br>
</div>

</div>

<div id="right">

<div class="head">
Beheer:
</div>
<div class="content">
<form action="" method="POST" name="form"><input type="hidden" name="action" value="login">
[img]"images/pics/people.gif"[/img]
<input type="text" name="loginnaam" size="15" onfocus="this.value=''; document.form.wachtwoord.value='';"><br>
[img]"images/pics/key.gif"[/img]
<input type="password" name="wachtwoord" size="15" onfocus="this.value='';"><br>
<input src="images/pics/pijl.gif" alt="Inloggen!" type="image" name="submit">
</form>
</div>

</div>

<div class="inhoud">
Lorem ipsum dolor <a href="#">link</a> amet, consectetuer adipiscing elit. Morbi mi. Fusce ultricies, orci a varius scelerisque, mauris sem <br>
gravida turpis, vitae commodo sem diam id purus. Morbi velit sapien, mollis nec, egestas tempus, euismod <br>vel, mi. Duis nec erat.
Sed ac metus. Praesent accumsan augue ut massa. Vivamus facilisis, lacus at tempus varius, massa tortor iaculis ante, eget auctor
ipsum eros eget erat. Sed iaculis wisi quis lacus. Cras metus. Nullam magna tellus, porttitor in, condimentum ac, lobortis vel, ero <br>
s. Donec et urna. Duis rutrum metus vel tellus. In hac habi<br>tasse platea dictumst. Sed in risus. Nunc nec leo eget ipsum cu<br>rsus scele
risque. Morbi orci metus, scelerisque sit amet, dignissim nec, dictum nec, tortor. Duis libero. Vestibulum rhoncus ligula ac or
ci. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce quis dui.<br><br>

Sed tellus ipsum, faucibus ut, v<a href="">ulputate </a></div>

</body>
</html>


De stylesheet:
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
body {
    color: black;
    background-color: white;
    margin: 0px;
    font: 12px verdana, arial, helvetica, sans-serif;
    background-image: url(images/background.gif);
    }
form { margin: 0px; }
.fout {
    margin: 10px auto 10px auto;
    width: 390px;
    padding: 5px;
    border: 1px dashed black;
    }
.fout_left {
    margin: 10px 0px;
    width: 390px;
    padding: 5px;
    border: 1px dashed black;
    }
h1 {
    margin-top: 0px;
    font-size: 18pt;
    }
h5 {
    margin-top: 0px;
    font-size: 10pt;
    }
a   {
    color: #059A05;
    text-decoration: none;
    }
a:hover {
    color: black;
    font-weight: bold;
    }
#top {
    margin: 0px;
    padding: 0px;
    height: 126px;
    overflow: hidden;
    background-image: url(images/header_right.gif);
    }
#top img {
    vertical-align: top;
    }
#afdeling {
    position: absolute;
    top: 84px;
    left: 120px;
    font: bold 30px "century gothic", verdana, arial, helvetica, sans-serif;
    z-index: 1;
    }
#checkstat {
   position: absolute;
   right: 0px;
   top: 84px;
   }
#left {
    float: left;
    margin: 0px;
    width: 160px;
    }
#right {
    float: right;
    margin: 0px;
    width: 160px;
    }
.head {
    margin: 10px 0px 0px 0px;
    font-size: 17px;
    text-indent: 5px;
    vertical-align: middle;
    width: 160px;
    height: 25px;
    background-image: url(images/head.gif);
    }
.content {
    margin: 0px 0px 3px 0px;
    background-color: #CCEACD;
    padding: 4px 5px 4px 5px;
    width: 150px;
    }
.inhoud {
    margin: 10px 170px 3px 170px;
    border: 1px solid black;
    background-color: yellow;
    }
img.foto {
    margin: 5px 5px 5px 5px;
    }

[ Voor 17% gewijzigd door wilcodl op 30-01-2006 14:22 ]


  • Wizz15
  • Registratie: Januari 2004
  • Laatst online: 26-10-2022
dat padding probleem met die float is een bekende bug, de oplossing staat op deze pagina: http://www.positionisever...explorer/floatIndent.html

voor dat tweede probleem weet ik even geen oplossing.

PSN: RikBruil | BFBC2 stats


  • wilcodl
  • Registratie: September 2004
  • Laatst online: 30-03 22:55
ik heb de pagina bekeken en de tips uitgevoerd, maar het is me niet gelukt... Verder iemand nog een idee?

  • Folkert
  • Registratie: September 2001
  • Laatst online: 22:20
1e probleem:
http://www.positionisever...explorer/threepxtest.html

2e probleem staat bekend onder de prachtige naam 'peekaboo' bug:
http://www.positioniseverything.net/explorer/peekaboo.html

[ Voor 31% gewijzigd door Folkert op 31-01-2006 17:46 ]


  • wilcodl
  • Registratie: September 2004
  • Laatst online: 30-03 22:55
Bedankt Folkert!! Ik heb het opgelost. Toen ik het eerste probleem had opgelost was het 2e probleem ook verholpen! Ik heb het opgelost door deze css code aan de stylesheet toe te voegen:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Hide from IE5-mac \*/

* html #left {
margin-right: 7px;
}

* html #right {
margin-left: 7px;
}

* html .inhoud {
height: 1%;
margin-left: 0;
}

/* End IE5/mac hide */

  • ZeilDude
  • Registratie: Juli 2004
  • Laatst online: 19-02-2022
wilcodl schreef op dinsdag 31 januari 2006 @ 19:36:
Bedankt Folkert!! Ik heb het opgelost. Toen ik het eerste probleem had opgelost was het 2e probleem ook verholpen! Ik heb het opgelost door deze css code aan de stylesheet toe te voegen:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Hide from IE5-mac \*/

* html #left {
margin-right: 7px;
}

* html #right {
margin-left: 7px;
}

* html .inhoud {
height: 1%;
margin-left: 0;
}

/* End IE5/mac hide */
Nu IE7 voor de deur staat, kun je maar beter niet meer dit soort hacks gebruiken. Je kunt beter conditional statements gebruiken. Een goede discussie hierover vind je op 456bereastreet.com.
Pagina: 1