{"id":69,"date":"2012-08-27T16:31:17","date_gmt":"2012-08-27T16:31:17","guid":{"rendered":"https:\/\/ai.hasebox.de\/index.php\/2012\/08\/27\/2-auslagern-von-css-befehlen\/"},"modified":"2023-12-14T16:45:04","modified_gmt":"2023-12-14T16:45:04","slug":"2-auslagern-von-css-befehlen","status":"publish","type":"post","link":"https:\/\/ai.hasebox.de\/index.php\/2012\/08\/27\/2-auslagern-von-css-befehlen\/","title":{"rendered":"2.1 Auslagern von CSS-Befehlen"},"content":{"rendered":"<h2 style=\"margin: 0px; padding: 0px 0px 1em; color: #000000; font-family: 'Lucida Grande', arial, verdana, sans-serif; font-size: 14px; line-height: 21px; word-spacing: 1px;\">Grunds\u00e4tzlich<\/h2>\n<p style=\"margin: 0px; padding: 0px 0px 1em; color: #000000; font-family: 'Lucida Grande', arial, verdana, sans-serif; font-size: 14px; line-height: 21px; word-spacing: 1px;\">Zum Auslagern werden 2 Dinge ben\u00f6tigt. Als erstes eine neue Datei, ich nenne diese design.css (kann aber auch beliebig anders hei\u00dfen) und als zweites einen Verweis darauf in der HTML-Datei, die diese ausgelagerte Datei nutzen soll.<\/p>\n<p style=\"margin: 0px; padding: 0px 0px 1em; color: #000000; font-family: 'Lucida Grande', arial, verdana, sans-serif; font-size: 14px; line-height: 21px; word-spacing: 1px;\">Bevor wir beginnen erstelle ein neues Arbeitsverzeichnis: \/ai\/css\/2_auslagern<br \/>Jetzt erstelle in diesem Verzeichnis die Datei anfang1.html<br \/>Kopiere den folgenden Code.<\/p>\n<p style=\"margin: 0px; padding: 0px 0px 1em; color: #000000; font-family: 'Lucida Grande', arial, verdana, sans-serif; font-size: 14px; line-height: 21px; word-spacing: 1px;\">Beachte den head-Bereich, hier wird der Verweis angegeben, der die css-Datei einbindet. Diese css-Datei wird weiter unten erstellt. DAS \/ai\/ vor design.css weglassen<\/p>\n<pre style=\"margin: 0px 0px 1em; padding: 0px 0.8em; position: relative; border-left-color: #b4c6e0; border-left-width: 6px; border-left-style: solid; overflow: auto; font-family: monospace; font-size: 1em; line-height: 1.5em; background-color: #eeeeee; word-spacing: 1px;\">&lt;html&gt;\r\n<br \/>&lt;head&gt;<br \/><br \/>   &lt;link href=\"design.css\" type=\"text\/css\" rel=\"stylesheet\" \/&gt; <br \/><br \/>&lt;\/head&gt;<\/pre>\n<pre style=\"margin: 0px 0px 1em; padding: 0px 0.8em; position: relative; border-left-color: #b4c6e0; border-left-width: 6px; border-left-style: solid; overflow: auto; font-family: monospace; font-size: 1em; line-height: 1.5em; background-color: #eeeeee; word-spacing: 1px;\">&lt;body&gt; <br \/>&lt;h1&gt;jetzt HTML lernen mit CSS&lt;\/h1&gt;<br \/>&lt;\/body&gt; <\/pre>\n<pre style=\"margin: 0px 0px 1em; padding: 0px 0.8em; position: relative; border-left-color: #b4c6e0; border-left-width: 6px; border-left-style: solid; overflow: auto; font-family: monospace; font-size: 1em; line-height: 1.5em; background-color: #eeeeee; word-spacing: 1px;\">&lt;\/html&gt;<\/pre>\n<p style=\"margin: 0px; padding: 0px 0px 1em; color: #000000; font-family: 'Lucida Grande', arial, verdana, sans-serif; font-size: 14px; line-height: 21px; word-spacing: 1px;\">&nbsp;<\/p>\n<p style=\"margin: 0px; padding: 0px 0px 1em; color: #000000; font-family: 'Lucida Grande', arial, verdana, sans-serif; font-size: 14px; line-height: 21px; word-spacing: 1px;\">&nbsp;So, abspeichern nicht vergessen und jetzt erstellen wir im gleichen Verzeichnis eine neue Datei mit dem Namen &#8222;design.css&#8220;.<\/p>\n<p style=\"margin: 0px; padding: 0px 0px 1em; color: #000000; font-family: 'Lucida Grande', arial, verdana, sans-serif; font-size: 14px; line-height: 21px; word-spacing: 1px;\"><br style=\"margin: 0px; padding: 0px;\" \/>Der Inhalt lautet:<\/p>\n<pre style=\"margin: 0px 0px 1em; padding: 0px 0.8em; position: relative; border-left-color: #b4c6e0; border-left-width: 6px; border-left-style: solid; overflow: auto; font-family: monospace; font-size: 1em; line-height: 1.5em; background-color: #eeeeee; word-spacing: 1px;\">h1 {     color:red;<br \/><br \/><span style=\"font-size: 1em; line-height: 1.5em;\">         letter-spacing:30px;  }<\/span><\/pre>\n<p style=\"margin: 0px; padding: 0px 0px 1em; color: #000000; font-family: 'Lucida Grande', arial, verdana, sans-serif; font-size: 14px; line-height: 21px; word-spacing: 1px;\">Unbedingt auf Leerzeichen achten, und als Klammern kommen hier die geschweiften zum Zuge!! Datei abspeichern!<br \/>Aufpassen, dass es nicht eine design.css.txt wird. Also vorher bei &#8211; Datei &#8211; speichern unter auf &#8222;Alle Dateien&#8220; stellen.<\/p>\n<p style=\"margin: 0px; padding: 0px 0px 1em; color: #000000; font-family: 'Lucida Grande', arial, verdana, sans-serif; font-size: 14px; line-height: 21px; word-spacing: 1px;\">Nun die html-Datei anfang1.html aufrufen. Sollte deine h1 nun g r o \u00df und r o t sein, hast du alles richtig gemacht. Wenn nicht, dann &#8230; finde den Fehler.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Grunds\u00e4tzlich Zum Auslagern werden 2 Dinge ben\u00f6tigt. Als erstes eine neue Datei, ich nenne diese design.css (kann aber auch beliebig anders hei\u00dfen) und als zweites einen Verweis darauf in der HTML-Datei, die diese ausgelagerte Datei nutzen soll. Bevor wir beginnen erstelle ein neues Arbeitsverzeichnis: \/ai\/css\/2_auslagernJetzt erstelle in diesem Verzeichnis die Datei anfang1.htmlKopiere den folgenden Code. [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[50],"tags":[],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-css"],"_links":{"self":[{"href":"https:\/\/ai.hasebox.de\/index.php\/wp-json\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ai.hasebox.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.hasebox.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.hasebox.de\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.hasebox.de\/index.php\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":1,"href":"https:\/\/ai.hasebox.de\/index.php\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":411,"href":"https:\/\/ai.hasebox.de\/index.php\/wp-json\/wp\/v2\/posts\/69\/revisions\/411"}],"wp:attachment":[{"href":"https:\/\/ai.hasebox.de\/index.php\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.hasebox.de\/index.php\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.hasebox.de\/index.php\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}