Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [HTML] a walidator i <style>
Forum PHP.pl > Forum > Przedszkole
right6
jak mozna umiescic akrusze stylow wewnatrz dokumentu, w sekcji body, aby walidator XHTML sie ni plul questionmark.gif?

daje <style></style> jest zle
daje <script type="text/css"></script> jest zle ohmy.gif
kmk2000
wystarczy ze zastosujesz:
Kod
<style type="text/css">
<!--
kod css
-->
</style>

i sie nie pluje
right6
du**

Kod
<style type="text/css">

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
Vogel
bo ma byc zewnetrzny arkusz CSS!
right6
no wlasnie caly problem w tym ze potrzebuje go umiescic w body, i nie chce robic src=
Kuziu
Nie rozumię dlaczego nie możesz go dać w pliku CSS ? i dołączyć w Head ?
maverickkk
Zmień DOCTYPE na starszy i olej XHTML skoro musisz go umieścić w tym samym pliku.
kmk2000
lol to formułuje sie pytania tak zeby wiadomo bylo o co chodzi
  1. <link rel="stylesheet" type="text/css" href="style.css" />
right6
lol kmk2000 - wyraznei napisalem, ze ze nie ma byc src. Jak sie wchodzi sie czyta.
stoprocent
Cytat
bo ma byc zewnetrzny arkusz CSS!


Nie musi.

right6 : z jakiego naglowka korzystasz?

prosze oto przyklad

Strona z cssem w pliku html
http://clients.demomedia.co.uk/sp/
i validacja tej strony
http://validator.w3.org/check?verbose=1&ur...edia.co.uk%2Fsp
kwiateusz
Cytat(right6 @ 2006-05-08 22:30:08)
no wlasnie caly problem w tym ze potrzebuje go umiescic w body, i nie chce robic src=

body questionmark.gif css odkad pamietam umieszczalo sie w head ...
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.