"We are back" « oc.at

CSS frage

CROWLER 10.06.2004 - 13:31 618 8
Posts

CROWLER

Powerbunny
Avatar
Registered: Nov 2000
Location: aufWean
Posts: 1893
wie kann ich einen table ohne abstand zum browsertop positioniern (ist ja immer ein kleiner abstand vom eigendlichen websiteanfang umd dem browserfenster)

tomstig

OC Addicted
Avatar
Registered: Nov 2003
Location: /home/tomstig/
Posts: 1341
Code: PHP
body{
  margin-top: 0px;
  margin-left: 0px;
}

hth

CROWLER

Powerbunny
Avatar
Registered: Nov 2000
Location: aufWean
Posts: 1893
thx!

Rektal

Here to stay
Registered: Dec 2002
Location: Inside
Posts: 4513
Es gibt Browser die haben anstatt eines "margin" auch/oder "padding". X-Browser also:
Code:
body {
  margin: 0;
  padding: 0;
}

moidaschl

Vollzeit-Hackler
Avatar
Registered: Aug 2002
Location: 1210, ABK-D/L
Posts: 4029
also wär die sicherste variante:

Code: PHP
body {
 margin-top: 0px;
 margin-left: 0px;
 padding: 0;
}
??

Rektal

Here to stay
Registered: Dec 2002
Location: Inside
Posts: 4513
Um deine Frage mit Background-Info zu beantworten, die folgenden Ausdruecke sind alle equivalent:
Code:
margin: 0;

margin: 0 0;

margin: 0 0 0;

margin: 0 0 0 0;

margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
Wobei ohne explizite -top/-right/-bottom-/left Angaben gilt:

ein Wert -> alle vier
zwei Werte -> top/bottom , left/right
drei werte -> top, right, bottom
vier werte -> top, right, bottom, left

Das gilt auch fuer padding und border.

tomstig

OC Addicted
Avatar
Registered: Nov 2003
Location: /home/tomstig/
Posts: 1341
Zitat von Rektal
zwei Werte -> top/bottom , left/right

und wer entscheidet das? :confused:

watchout

Legend
undead
Avatar
Registered: Nov 2000
Location: Off the grid.
Posts: 6845
Zitat von tomstig
und wer entscheidet das? :confused:
das w3c?
hier zb: http://www.w3c.org/TR/CSS1#margin


btw: drei werte -> top, right, bottom
stimmt nicht ganz...
drei werte -> top, left/right, bottom
stimmt :)

Rektal

Here to stay
Registered: Dec 2002
Location: Inside
Posts: 4513
Ops :/
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz