|
| Lidt Tech. smalltalk ? Fra : molokyle | Vist : 509 gange 30 point Dato : 16-09-05 20:50 |
|
Tidligere er jeg blevet spurgt om; hvad en !DOCTYPE i et HTML/XHTML dokument skal bruges til og hva' gør den godt for?
..udover at denne erklæring er nødvendig for at få valideret sin kode hos http://w3.org ???
Hmmmm.... emesen spurgte engang ..og jeg måtte blive svar skyldig
[hør] Hvad fa'en ska' en !DOCTYPE erklæring egentlig bruges til ..andet end at forvirre og bruges som Buzzword ?
Tjaeh...
Prøv lige dette : http://www.meyerweb.com/eric/css/tests/doctype1.html
UC ?
Uden !DOCTYPE sættes browseren i Quirks mode : http://www.webmasterworld.com/forum21/7975.htm
..og liiiiige et par ord fra GURU'en : http://www.ericmeyeroncss.com/bonus/render-mode.html
Bare lige; hvis der var andre end emesen, bentjuul og jeg, der har spekuleret over det?
Ikke noget spørsmål som sådan, men blot en reflektion over noget jeg længe har ledt efter en go' forklaring på !
KEEP COOL ...and HAPPY CODING
</MOLOKYLE>
| |
|
ja jeg har også ligget søvnløs flere dage og nætter
| |
| Kommentar Fra : molokyle |
Dato : 16-09-05 20:59 |
|
Til Meyer kan jeg tilføje : !DOCTYPE for XHTML ver. 1.1 ser således ud (..jeg har indsat extra mellemrum, da http://www.kandu.dk eller ik' vil være med ) :
Kode <! D O C T Y P E h t m l P U B L I C " - / / W 3 C / / D T D X H T M L 1 . 1 / / E N " " h t t p : / / w w w . w 3 . o r g / T R / xh t m l 1 1 / D T D / xh t m l 1 1 . d t d " > |
..og HTML prologen/parameteren skal være (..hér gengivet UDEN indsatte mellemrum) :
Kode <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da"> |
</MOLOKYLE>
| |
| Kommentar Fra : Klumme |
Dato : 16-09-05 21:02 |
| | |
| Kommentar Fra : molokyle |
Dato : 16-09-05 21:08 |
|
Til de der ikke kan følge diskussionen hos webmasterworld :
Citat There's been some question (sometimes a lot of question) about what quirks mode is, and the parallel question, what standards mode is. For many web designers, these are still unknown words - so I hope we can clear some of this up and give a platform for further learning.
Up until version 6 browsers, there was a lot of non-standard rendering built into user agents. A lot of this behavior didn't conform to the W3C rendering recommendations at all, but it was what we worked with and we got very used to it.
And then came the move to standards, with Document Type Declarations (DTD) and all that. But how can new browsers handle those legacy pages all, over the web that depend on "quirky" behavior in order to look good?
That became the question, and the answer is "quirks" mode.
If a browser sees a full DTD as the FIRST element of a document, including the W3C URL for the details, then it renders the page in "standards" mode. Because standards are still relatively young, there is some variation from one browser to another, but it's usually minor.
But if a browser sees no DTD, or a partial DTD, then it goes into "quirks mode", which essentially means rendering the page the wrong way, but the way we were used to up until version 6.
What this all means in specific detail is way beyond the scope of one thread. But I thought it would be very useful to have this explanation and a set of references in one spot, to get people started out on the right foot if this is all new to them. More and more, you will see these two modes mentioned in threads.
REFERENCES
W3C Valid DTDs
Opera re: Quirks Mode
Mozilla re: Quirks Mode
Microsoft re: Quirks Mode
DTDs and FrontPage
DrDoc
Moderator Forum 83
joined:Mar 15, 2002
posts:4369
msg #:2 7:27 am on May 28, 2004 (utc 0)
Excellent excellent topic!
Why didn't I think of this first? ;)
This is a topic that comes up frequently in the CSS forum. Understanding (and, usually, avoiding quirks mode) is one of the keys to successfully producing cross-browser compatible web content. While there is much more to it than what first catches the eye ( >> What this all means in specific detail is way beyond the scope of one thread.) it is really important, if not crucial, to have at least a basic understanding for what quirks vs. standards mode means.
Also, I would like to add a reference to the list... Even though this page is linked to from the MS quirks mode page I feel it deserves its own link. Since Internet Explorer is the most commonly used browser today (and, unfortunately, the least standards compliant) it makes the task of web development much easier when one understand the limitations of IE, but also its strengths. MS made some significant changes to the IE6 rendering engine, resulting in a definite separation of quirks vs. standards-compliant mode.
tedster
Administrator
joined-May 26, 2000
posts:9918
msg #:3 2:20 am on May 29, 2004 (utc 0)
Here's one of the very common issues that keeps coming up - so I think it's worthy of a special mention here.
Say you've got some images held together nice and tight in a group of table cells. And in Explorer that's exactly what happens - the images interface with no gaps at all. Maybe now after some hard work your mark-up has validated to some nice DTD - maybe XHTML strict.
But when you view your page in a recent browser (especially Mozilla, Netscape) you find a fat extra space, commonly below the image.
The issue is that until recent browser versions, every user agent got the rendering of inline images wrong (and images are inline by default) -- and we all got our mark-up wrong as a result.
Inline images in a table cell are "supposed to" be aligned with the BASELINE of the text, or where that baseline would be even if there is no text. Non-standard browsers traditionally have aligned the images with the cell's bottom, not the text baseline.
So standards mode is throwing in extra space between the image (which ends at the text baseline) and the table cell's bottom. Or maybe even adding in more space around the image, because of other padding and margin rules that are inherited from the container's parent elements.
You can fix this nasty little surprise with CSS, by setting a style rule for any <td> that contains images and switching the display of the img element from inline to block.
Try this:
td.imgholder img {
display:block;
margin:0;
padding:0;
}
It's all about standards mode vs. quirks mode!
DrDoc
Moderator Forum 83
joined:Mar 15, 2002
posts:4369
msg #:4 2:43 am on May 29, 2004 (utc 0)
An alternative solution to the above mentioned problem is to simply tell the image not to align with the baseline:
td img {
vertical-align: bottom;
}
photon
Senior Member
joined-Nov 13, 2002
posts:791
msg #:5 11:25 pm on May 29, 2004 (utc 0)
Thanks tedster. This is a much needed thread. I'm sure it will be referenced quite frequently in this forum.
And I too wish I had thought of it!
DrDoc
Moderator Forum 83
joined:Mar 15, 2002
posts:4369
msg #:6 5:03 am on May 30, 2004 (utc 0)
Images, tables, and mysterious gaps:
One of the best articles ever, describing this very problem, can be found on Netscape's DevEdge website.
4serendipity
Junior Member
joined:Jan 5, 2003
posts:126
msg #:7 8:30 am on May 30, 2004 (utc 0)
Up until version 6 browsers, there was a lot of non-standard rendering built into user agents.
To be strictly accurate, the first browser that employed doctype switching was a version 5 browser, IE 5 Mac.
An old O'reilly article detailing the then new feature can be read at:
http://www.oreillynet.com/pub/a/network/2000/04/14/doctype/
markd
Preferred Member
joined-Jan 8, 2001
posts:538
msg #:8 12:34 pm on May 30, 2004 (utc 0)
Can't wait for Yahoo to realise this, and incorporate it into their Editorial Judgement criteria for entry into Site Match :)) LOL
Multiverse
New User
joined:Apr 15, 2003
posts:23
msg #:9 7:47 pm on May 30, 2004 (utc 0)
Up until version 6 browsers, there was a lot of non-standard rendering built into user agents
Damn, im using Firefox 0.8 and thought that was up to date!
WebDon
Junior Member
joined:Mar 3, 2003
posts:50
msg #:10 10:01 pm on May 30, 2004 (utc 0)
Multiverse: I think Mozilla Firefox 0.8 qualifies as a newer browser. When they talk about pre-version 6 browsers they're talking about the browsers that have been around a while like IE, Netscape, Opera, etc |
..og der er 5 sider mere af samme slags
</MOLOKYLE>
| |
| Kommentar Fra : molokyle |
Dato : 16-09-05 21:12 |
| | |
|
ja og jeg sidder stadig og har kvaler med at huske hvordan man laver linje skift i HTML
| |
|
hehe det er faktisk noget af det eneste jeg kan huske af de 5 sidder HTML tutorial jeg læste for 2 år siden ud over noget med <p> som jeg alligevel ikke kan huske hvad det gjorde
| |
| Kommentar Fra : molokyle |
Dato : 16-09-05 21:24 |
|
Egentlig en ulidelig markør; den dersens linjeskift 'ting', som jeg håber bliver deprecated snart, da den fortælller mere om form (..som er en CSS opgave) end om indhold (..(D-/X-/HTML's opgave).
Position egenskaben i CSS burde være alt andet rigeligt : http://www.w3schools.com/css/css_positioning.asp
</MOLOKYLE>
| |
|
nice smeylies du kan man :D ka kun hitte ud af de færreste
| |
|
hehe kan du så ikke også tænke over det der nyheds halløj der du er jo fandme så klog på sådan noget
| |
|
ah nice thaks
| |
| Kommentar Fra : molokyle |
Dato : 17-09-05 09:12 |
|
mulberry -> Takker
ME.alexander -> Hvis du har (oprettet?) et specifikt spørgsmål, så læg en URL her. Det er nemlig næsten umuligt at søge på dit nick, da der indgår punktum i det og kandu.dk's søgealgoritme tolker dit nick som en søgning på :
+ME ..og +alexander
</MOLOKYLE>
| |
| Kommentar Fra : molokyle |
Dato : 17-09-05 09:14 |
| | |
|
Godmorgen Molokyle
det her er URL: http://www.kandu.dk/dk/spg/74395
men jeg har jo stadig ikke så meget forstand på de der kodninger har mere forstand på at indsætte dem
| |
|
Hehe om ikke andet jeg måske kan få dig til at hjælpe mig ? har set på det, men nej fatter ik en skid af det der
| |
|
og angående brødet så må jeg jo endten lade vær med at putte for meget gær i, eller skaffe mig en større ovn
| |
|
hehe jah du har sq nok ret... så hellere få de proffesionelle til at bage den... men har nu ikke helt tænkt mig at lære CSS fra bunden af.. har hørt det skulle tage 3 år.. så hellere glemme det..
| |
| Kommentar Fra : molokyle |
Dato : 17-09-05 19:22 |
|
[hør] Lyt og lær :
Citat Dét er korrekt, men min indstilling til tingene er denne:
Hvis man ønsker at 'promovere' sig på internettet med en hjemmeside, er det mindste man kan gøre inden man ulejligheder resten af verdenen og belaster netbåndbredden, at sætte sig en smule ind i, hvad man har gang i.
Derfor synes jeg som minimum man må lære sig HTML og CSS og det kan gøres f.eks. hér på kandu.dk :
1.) http://www.kandu.dk/dk/kurser/html/htmlkursus.asp
2.) http://www.kandu.dk/dk/kurser/css/cssKursus.asp
..i stedet for blot at tampe en masse ting ind i en WYSIWYG editor som Frontpage, som måske nok kan lave noget der 'næsten' virker, men som aldrig vil komme til at lave korrekt validerende kode, som anbefalet af http://w3.org
Derfor Notesblok (notepad.exe) som editor ..så får man KUN de fejl på siden man selv laver 8-)
Derefter kan man 'lege' videre med HTML DOM, XHTML Javascript, VBscript, Java, XML/XLS, ASP, PHP osv.
En meget anbefalelsesværdig norsk side (..på engelsk) her : http://www.w3schools.com/
Jeg har aldrig hørt andre end Microsoft ..og nogle få 'amatører' anbefale Frontpage ;-)
Tag nu ikke dette ilde op og bli' du bare ved at bruge Frontpage eller what-so-ever, hvis du har det bedst med det. Jeg synes blot jeg ville begrunde min mening om 'tingene', når nu jeg blev opfordret af XXX |
Altså : Hvis 'budskabet' blot er; at blive 'hørt' på nettet ???
Ovenstående er et redigeret svar fra undertegnede til en anden bruger hér på stedet
Tjaeh... så gør du bare, som du lyster
</MOLOKYLE>
| |
|
Hehe jah jeg tror jeg først og fremmest får fat på en host der tillader det script der skal bruges til gæstebogen
| |
| Du har følgende muligheder | |
|
Eftersom du ikke er logget ind i systemet, kan du ikke skrive et indlæg til dette spørgsmål.
Hvis du ikke allerede er registreret, kan du gratis blive medlem, ved at trykke på "Bliv medlem" ude i menuen.
| |
|
|