Centreren met CSS/HTML

Gestart doorRubenmaxie22 reacties35 weergaven

23 berichten · pagina 2 van 2

Berichten
536
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
en dan nog een text-align: left;
in de body
0
Rubenmaxie

Lid · Topicstarter

Berichten
592
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij doet het nog steeds niet, ik denk dat ik maar eens wat met margin enzo gaa proberen. confused
Nieuwe URL:
http://www.oefenen.t35.com/test_1.php

Ik heb hiermee van alles geprobeerd, maar het lukt nog niet, ik heb nu de code even opnieuw,
vereenvoudigd uitgetypt:

<html>
<head>
<style type="text/css">
body {
    background-color: #CDC9C9;
    padding: 0;
    margin: 0;
}

p {
    margin-left: 10px;
    margin-right: 10px;
}

h1 {
    margin-top: 15px;
    margin-left: 15px;
    margin-bottom: 10px;
}

#kolom_1 {
    background-color: #4876FF;
    color: #000000;
    height: 198px;
    width: 191px;
    border: 1px solid #000000;
    border-bottom: none;
    float: left;
    position: absolute;
    top: 0;
    left: 0;
}

#kolom_2 {
    background-color: #4876FF;
    color: #000000;
    height: 369px;
    width: 191px;
    border: 1px solid #000000;
    float: left;
    position: absolute;
    top: 198.5px;
    left: 0;
}

#kolom_3 {
    background-color: #4876FF;
    color: #000000;
    height: 301px;
    width: 479px;
    border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
    float: left;
    position: absolute;
    top: 266.9px;
    left: 191px;
}

#kolom_4 {
    background-color: 4876FF;
    color: #000000;
    height: 266px;
    width: 479px;
    border: 1px solid #000000;
    border-left: none;
    float: left;
    position: absolute;
    top: 0;
    left: 191px;
}

#kolom_5 {
    background-color: 4876FF;
    color: #000000;
    height: 567px;
    width: 287.5px;
    border: 1px solid #000000;
    border-left: none;
    float: left;
    position: absolute;
    top: 0;
    left: 670px;
}
</style>
<title>Homepagina</title>
</head>
<body>
<div id="kolom_1">
</div>
<div id="kolom_2">
</div>
<div id="kolom_3">
</div>
<div id="kolom_4">
</div>
<div id="kolom_5">
</div>
</body>
</html>
0
Rubenmaxie

Lid · Topicstarter

Berichten
592
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Weet iemand het misschien inmiddels al? hypocrite
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
<html>
<head>
<style type="text/css">
body {
    background-color: #CDC9C9;
    padding: 0;
    margin: 0;
}

p {
    margin-left: 10px;
    margin-right: 10px;
}

h1 {
    margin-top: 15px;
    margin-left: 15px;
    margin-bottom: 10px;
}

div#container{
width: 900px;//Breedte van je layout.
margin: 0px auto;
}

#kolom_1 {
    background-color: #4876FF;
    color: #000000;
    height: 198px;
    width: 191px;
    border: 1px solid #000000;
    border-bottom: none;
    float: left;
    position: absolute;
    top: 0;
    left: 0;
}

#kolom_2 {
    background-color: #4876FF;
    color: #000000;
    height: 369px;
    width: 191px;
    border: 1px solid #000000;
    float: left;
    position: absolute;
    top: 198.5px;
    left: 0;
}

#kolom_3 {
    background-color: #4876FF;
    color: #000000;
    height: 301px;
    width: 479px;
    border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
    float: left;
    position: absolute;
    top: 266.9px;
    left: 191px;
}

#kolom_4 {
    background-color: 4876FF;
    color: #000000;
    height: 266px;
    width: 479px;
    border: 1px solid #000000;
    border-left: none;
    float: left;
    position: absolute;
    top: 0;
    left: 191px;
}

#kolom_5 {
    background-color: 4876FF;
    color: #000000;
    height: 567px;
    width: 287.5px;
    border: 1px solid #000000;
    border-left: none;
    float: left;
    position: absolute;
    top: 0;
    left: 670px;
}
</style>
<title>Homepagina</title>
</head>
<body>
<div id="container">
    <div id="kolom_1">
    </div>
    <div id="kolom_2">
    </div>
    <div id="kolom_3">
    </div>
    <div id="kolom_4">
    </div>
    <div id="kolom_5">
    </div>
</div>
</body>
</html>


jou code gecombineerd met die van annubisfan smilezo moet ie lukken, alleen de breedte van je lay ff aanpassen in de code!
0
Rubenmaxie

Lid · Topicstarter

Berichten
592
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Doet het nog steeds niet, ik snap er niks van. confused
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik denk dat je onder body de padding en margin weg moet halen ofzo...
0
Rubenmaxie

Lid · Topicstarter

Berichten
592
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Oke, zal het gelijk even doen. yummieZeg zo wel of het gelukt is,

Alvast bedankt weer! smile
_____________________________________

Werkt ook al niet. confused
0
Rubenmaxie

Lid · Topicstarter

Berichten
592
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Iemand nog? Ik word er nou een beetje gek van. confused
____________________________________________

Het is me eindelijk net zelf gelukt! biggrin
Het werkte iets anders, dan jullie dachten...
Iemand misschien behoefte aan klein tutjee daarover? redface
Zeg het maar, dan zet ik die even in elkaar.

Iedereen bedankt voor het meedenken, wink
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren