Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Style ändern
#9
(2018-04-04, 02:10:03)bero Wrote: Ich hab's grade nochmal ausprobiert.
Es ist tatsächlich so, wie ich geschrieben habe, alles Andere hätte mich auch gewundert.
Nein, es ist nicht so wie Du geschrieben hast. Die Kaskade läuft so:

Im Stylesheet steht table { width:100% }
Im Dokument steht <table>
Ergebnis: <table> ist 100% breit

Im Stylesheet steht table { width:100% }
Im Dokument steht <table style="width:10%">
Ergebnis: <table> ist 10% breit

Im Stylsheet steht table { width:100% !important }
Im Dokument steht <table style="width:10%">
Ergebnis: <table> ist 100% breit.

Im Stylesheet steht table { width: 100% !important }
Im Dokument steht <table style="width:500px">
Ergebnis: <table> ist 100% breit.

Quote:Was im CSS steht, ist also nur relevant, wenn man KEINE Angaben zum Format macht.
Nein. Was im CSS steht, ist IMMER relevant, wenn Du hinter die Eigenschaftsdeklaration !important schreibst.

Alex
Reply


Messages In This Thread
Style ändern - by bero - 2018-04-01, 20:55:15
RE: Style ändern - by Alexander_ - 2018-04-01, 21:45:36
RE: Style ändern - by bero - 2018-04-02, 02:04:56
RE: Style ändern - by bero - 2018-04-02, 18:45:47
RE: Style ändern - by bero - 2018-04-02, 20:50:35
RE: Style ändern - by Alexander_ - 2018-04-03, 22:40:13
RE: Style ändern - by bero - 2018-04-04, 00:19:05
RE: Style ändern - by bero - 2018-04-04, 02:10:03
RE: Style ändern - by Alexander_ - 2018-04-05, 18:48:38



Users browsing this thread: 1 Guest(s)