Gå til innhold

lite css problem


Anbefalte innlegg

Videoannonse
Annonse
Skrevet

er litt veldig noob jeg så sjønte ikke hva du mente men kopier koden min og putt in det du hadde og post det her da :innocent:

 

 

Klikk for å se/fjerne innholdet nedenfor

<html>

<head>

<title>Snow, skate, atv, dirtbike.....</title>

<style type="text/CSS" media="screen">

body {

text-align: center;

font-family: arial, 'lucida console', sans-serif;

font-size: 12px;

}

 

a {

color: #0000FF;

font-weight: bold;

}

 

#page {

margin: 0px auto;

width: 768px;

}

 

#header {

 

height: 150px;

background: url('header.jpg');

border-bottom: 1px #000000 solid;

 

}

#bildehoyere {

float: right;

}

 

#meny {

 

background: #da03cd;

color: #da03cd;

font-weight: bold;

text-align: center;

font-size: 11px;

padding: 3px;

border-bottom: 1px #000000 solid;

}

 

#content {

background: #ffffff;

border-left: 2px #da03cd solid;

border-right: 2px #da03cd solid;

margin: 0px;

padding: 15px;

 

}

 

a {

 

color: #000000;

font-size: 14px;

}

 

h1, p, span, div {

margin: 0px;

padding: 0px;

}

#footer {

background: #da03cd;

color: #FFFFFF;

font-weight: bold;

text-align: center;

font-size: 11px;

padding: 2px;

}

 

#footer a {

color: #FFFFFF;

text-decoration: none;

}

</style></head>

<body background="back.jpg">

<div id="page">

<div id="header"></div>

<div id="meny"><a href="index.html">Hjem</a>

   

<a href="bilder.html">Bilder</a>

   

<a href="filmer.html">Filmer</a>

 

   

<a href="meg.html">Om meg</a>

   

<a href="Nyheter.html">Nyheter</a>

   

<a href="kontakt.html">Kontakt meg</a></div>

<div id="content">

<br>

<div id="bildehoyere">

<img src="meg.jpg"width="350"height="400"</img>

</div>

<p align="left">

<font color="#da03cd"size="3">Kort fakta</font><br><br>

 

Navn<br>

alder<br>

 

bosted<br>

favoritt film<br>

Musikk<br>

født<br></p>

</div>

 

 

 

<div id="footer"><p>copyright © Erik Nordstrøm</p></div>

 

</div>

 

 

 

 

 

Skrevet (endret)

Klikk for å se/fjerne innholdet nedenfor
<html>
<head>
<title>Snow, skate, atv, dirtbike.....</title>
<style type="text/CSS" media="screen">
body {
text-align: center;
font-family: arial, 'lucida console', sans-serif;
font-size: 12px;
}
* html #page {height:auto}

a {
color: #0000FF;
font-weight: bold;
}

#page {
margin: 0px auto;
width: 768px;
}

#header {

height: 150px;
background: url('header.jpg');
border-bottom: 1px #000000 solid;
min-height: auto;

}
#bildehoyere {
float: right;
}

#meny {

background: #da03cd;
color: #da03cd;
font-weight: bold;
text-align: center;
font-size: 11px;
padding: 3px;
border-bottom: 1px #000000 solid;
}

#content {
background: #ffffff;
border-left: 2px #da03cd solid;
border-right: 2px #da03cd solid;
margin: 0px;
padding: 15px;

}

a {

color: #000000;
font-size: 14px;
}

h1, p, span, div {
margin: 0px;
padding: 0px;
}
#footer {
background: #da03cd;
color: #FFFFFF;
font-weight: bold;
text-align: center;
font-size: 11px;
padding: 2px;
}

#footer a {
color: #FFFFFF;
text-decoration: none;
}
</style></head>
<body background="back.jpg">
<div id="page">
<div id="header"></div>
<div id="meny"><a href="index.html">Hjem</a>
   
<a href="bilder.html">Bilder</a>
   
<a href="filmer.html">Filmer</a>

   
<a href="meg.html">Om meg</a>
   
<a href="Nyheter.html">Nyheter</a>
   
<a href="kontakt.html">Kontakt meg</a></div>
<div id="content">
<br>
<div id="bildehoyere">
<img src="meg.jpg"width="350"height="400"</img>
</div>
<p align="left">
<font color="#da03cd"size="3">Kort fakta</font><br><br>

Navn<br>
alder<br>

bosted<br>
favoritt film<br>
Musikk<br>
født<br></p>
</div>



<div id="footer"><p>copyright © Erik Nordstrøm</p></div>

</div>

Endret av Shadows0
Skrevet (endret)

den gjorde ingen ting, men takk for at du prøvde:)

 

clear: both; hva gjør det?

 

det funker om jeg har en hel haug med <br> i bunn av content div'en med det er jo teit

 

jeg gjør det vis ingen andre kan hjelpe

Endret av Erik91
Skrevet
Possible Values

Value  Description

left  No floating elements allowed on the left side

right  No floating elements allowed on the right side

both  No floating elements allowed on either the left or the right side

none  Default. Allows floating elements on both sides

 

Bruk denne:

<div style="clear: both;"> </div>

så finner du det fort ut :)

Skrevet (endret)

Legg dette inn i CSS-fila:

.clearfix:after {
   content: "."; 
   display: block; 
   height: 0; 
   clear: both; 
   visibility: hidden;
}
.clearfix {
display: inline-table;
}

/* Hides from IE-mac \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* End hide from IE-mac */

Og gi content dette: class="clearfix"

Endret av attach
Skrevet

Erik91, du trenger ikke å angi en masse <br> for at det skal funke.

trenger heller ikke 700p høyde. Ta med en clear: both; så vil den flytte seg ned ettersom hvor mye content du har :-)

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
  • Hvem er aktive   0 medlemmer

    • Ingen innloggede medlemmer aktive
×
×
  • Opprett ny...