• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

einbinden externer css-datei klappt nicht

Status
Für weitere Antworten geschlossen.

Joda1994

Neues Mitglied
Hi!
wird zeit dass ich mich auch ma wieda zu wort melde. ich sollte für jemanden eine homepage machen. da hatte ich dann das ganze css in die div-tags mit reingeschrieben. nach 2 tagen dachte ich mir dann: bevor das zu viel und zu unübersichtlich wird, schmeiß das ganze doch in eine externe datei. das hab ich wie folgt gemacht:
HTML:
.body {
	background-color:black;
}

.nav {
	text-align:center;
	margin-top:100px;
}

.left {
	text-align:left;
}

.center {
	text-align:center;
}

.right {
	text-align:right;
}

.imp	{
	color:grey;
	text-decoration:underline;
	font-size:12pt
}
einbinden wollte ich es so:
HTML:
	<head>
	<link rel="stylesheet" href="layout.css" type="text/css" />
	</head>
und so verwenden(z.B.):
HTML:
<div id="nav">
jez hab ich das problem, dass das ganze nicht klappt und ohne irgendwelche css-attribute angezeigt wird. wo liegt denn hier mein fehler?
 
Werbung:
Du hast Klassen im CSS benutzt, weißt deinen HTML-Elementen aber IDs zu. Entweder du machst aus den . in der CSS-Datei ein #, oder du nimmst statt id="" einfach class="" (sinnvoller, da man die ID nur einmal verwenden könnte..)
 
is mir auch grad aufgefallen, geht aber immer noch nicht. was ich vielleicht vergessen hab zu erwähnen: ich will die restlichen divs in tabellen anwenden.
 
Zuletzt bearbeitet:
Werbung:
coolrunescape.com you can buy cheap, fast runescape gold about money making

what is the fastest way to make 1mil in runescape....Runescape, Runescape Gold, Runescape Money, Buy Runescape gold, Buy Runescape money on coolrunescapei am currently making 5k bow string which will get me about 500k but i don't know what to do after that.if u would like to look at my skills look at the highscores! plz help me.........!!!!!!!!!!!RunescapeRunescape goldWell.. around 3-4 years ago when i heard about runescape from a friend i decided to go check it out, i created 'Chavforlife' lol, you may laugh but it's true, i have no idea what made me think of that name, but yeah.. runescape powerlevelingBut anyway, since then i've only used this account but now it's got to the stage i actually really regret making this name in the first place, everyday my name get's commented by random player's, some "nice" comments suprisingly and some just pure hate which i understand ;p. But like with this name i'm forever getting judged, flamed when they have never actually spoken to me but meh.runescape cheatsWhat about you guy's, any of you regret making your runescape account name?http://www.maplemsmesos.com
 
Werbung:
Status
Für weitere Antworten geschlossen.
Zurück
Oben