<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Cascading Order</title>
	<atom:link href="http://www.divland.com/blog/2007/03/23/cascading-order/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.divland.com/blog/2007/03/23/cascading-order/</link>
	<description>The miracle land of inspiration</description>
	<pubDate>Fri, 21 Nov 2008 17:48:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: likhi1</title>
		<link>http://www.divland.com/blog/2007/03/23/cascading-order/#comment-71</link>
		<dc:creator>likhi1</dc:creator>
		<pubDate>Mon, 16 Apr 2007 21:11:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.divland.com/blog/2007/03/23/cascading-order/#comment-71</guid>
		<description>"ตัวอย่างนี้ แสดงให้เห็นถึงความสำคัญครับ โดยปกติ css จะยึดถือบรรทัดล่างสุด ในกรณีที่เราเขียนซ้ำกัน"


div p.test{ color:blue; }
p.test{color:red }


"โดยปกติแล้ว ตัวหนังสือที่ได้ ควรจะเป็น สีแดง ซึ่งกำหนดไว้บรรทัดล่าง
แต่ในกรณีนี้ บรรทัดบน มีการกำหนดที่มากกว่า จึงมีความสำคัญกว่านั่นเองครับ"


...อธิบายใหม่แบบนี้เข้าใจเลยครับ...

ขอคุณครับ  :d:d:d:d

PS. อยากให้ Webmaster เขียนติวเตอร์ การ Lay out 
      และ วาง Block ของภาพและข้อความ ต่างๆ บน Web แบบคร่าวๆ ด้วย CSS
      
     ขอให้เป็นแหล่งความรู้ดีๆแบบนี้ต่อไปนะครับ..........</description>
		<content:encoded><![CDATA[<p>&#8220;ตัวอย่างนี้ แสดงให้เห็นถึงความสำคัญครับ โดยปกติ css จะยึดถือบรรทัดล่างสุด ในกรณีที่เราเขียนซ้ำกัน&#8221;</p>
<p>div p.test{ color:blue; }<br />
p.test{color:red }</p>
<p>&#8220;โดยปกติแล้ว ตัวหนังสือที่ได้ ควรจะเป็น สีแดง ซึ่งกำหนดไว้บรรทัดล่าง<br />
แต่ในกรณีนี้ บรรทัดบน มีการกำหนดที่มากกว่า จึงมีความสำคัญกว่านั่นเองครับ&#8221;</p>
<p>&#8230;อธิบายใหม่แบบนี้เข้าใจเลยครับ&#8230;</p>
<p>ขอคุณครับ  <img src='http://www.divland.com/blog/smilies/yahoo_bigsmile.gif' alt='&#58;&#100;' class='wp-smiley' width='18' height='18' title='&#58;&#100;' /><img src='http://www.divland.com/blog/smilies/yahoo_bigsmile.gif' alt='&#58;&#100;' class='wp-smiley' width='18' height='18' title='&#58;&#100;' /><img src='http://www.divland.com/blog/smilies/yahoo_bigsmile.gif' alt='&#58;&#100;' class='wp-smiley' width='18' height='18' title='&#58;&#100;' /><img src='http://www.divland.com/blog/smilies/yahoo_bigsmile.gif' alt='&#58;&#100;' class='wp-smiley' width='18' height='18' title='&#58;&#100;' /></p>
<p>PS. อยากให้ Webmaster เขียนติวเตอร์ การ Lay out<br />
      และ วาง Block ของภาพและข้อความ ต่างๆ บน Web แบบคร่าวๆ ด้วย CSS</p>
<p>     ขอให้เป็นแหล่งความรู้ดีๆแบบนี้ต่อไปนะครับ&#8230;&#8230;&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: likhi1</title>
		<link>http://www.divland.com/blog/2007/03/23/cascading-order/#comment-68</link>
		<dc:creator>likhi1</dc:creator>
		<pubDate>Sun, 15 Apr 2007 20:07:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.divland.com/blog/2007/03/23/cascading-order/#comment-68</guid>
		<description>จากที่กำหนดให้ ...........
a เป็นจำนวนของ id  b เป็นจำนวนของ class และ c เป็นจำนวนของ tag html
อยากถามว่าดู ว่าตัวไหนเป้น  class ตัวไหนเป็น  tag html  ????

#id1{xxx} ----&#62;  มีการกำหนด id อย่างเดียว 1 ตัว  =   100   

โดยสังเกตุจาก #   และไม่มี Class ย่อยตาม


แล้ว....    
              UL UL LI.red {xxx}  ----&#62;  a=0 b=1 c=3   
              LI.red {xxx}   ----&#62;   a=0 b=1 c=1 
              LI {xxx}  ----&#62;  a=0 b=0 c=1
              

นับ และ ดูอย่างไรว่าอันไหนเป็น  class หรือ tag html  ????????</description>
		<content:encoded><![CDATA[<p>จากที่กำหนดให้ &#8230;&#8230;&#8230;..<br />
a เป็นจำนวนของ id  b เป็นจำนวนของ class และ c เป็นจำนวนของ tag html<br />
อยากถามว่าดู ว่าตัวไหนเป้น  class ตัวไหนเป็น  tag html  ????</p>
<p>#id1{xxx} &#8212;-&gt;  มีการกำหนด id อย่างเดียว 1 ตัว  =   100   </p>
<p>โดยสังเกตุจาก #   และไม่มี Class ย่อยตาม</p>
<p>แล้ว&#8230;.<br />
              UL UL LI.red {xxx}  &#8212;-&gt;  a=0 b=1 c=3<br />
              LI.red {xxx}   &#8212;-&gt;   a=0 b=1 c=1<br />
              LI {xxx}  &#8212;-&gt;  a=0 b=0 c=1</p>
<p>นับ และ ดูอย่างไรว่าอันไหนเป็น  class หรือ tag html  ????????</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: likhi1</title>
		<link>http://www.divland.com/blog/2007/03/23/cascading-order/#comment-66</link>
		<dc:creator>likhi1</dc:creator>
		<pubDate>Sun, 15 Apr 2007 17:58:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.divland.com/blog/2007/03/23/cascading-order/#comment-66</guid>
		<description>งงอ่ะ......ตั้งแต่ตรงนี้


การคำนวณลำดับความสำคัญจาก การประกาศ class และ id
ให้ a เป็นจำนวนของ id b เป็นจำนวนของ class และ c เป็นจำนวนของ tag html

#id1 {xxx} /* a=1 b=0 c=0 –&#62; เรียงตัวเลข abc = 100 */
UL UL LI.red {xxx} /* a=0 b=1 c=3 –&#62; เรียงตัวเลข abc = 013 */
LI.red {xxx} /* a=0 b=1 c=1 –&#62; เรียงตัวเลข abc = 011 */
LI {xxx} /* a=0 b=0 c=1 –&#62; เรียงตัวเลข abc = 001 */

ตัวเลขมากกว่า จะมีลำดับความสำคัญที่สูงกว่า จะเห็นว่า id มีความสำคัญสูงกว่า class หากเรียก id และ class พร้อมๆกันลักษณะที่กำหนด จะเป็นไปตาม id

ตัวอย่าง


ul li.test{ color:blue; } /*012*/
li.test{color:red } /*011*/


คุณว่าจะได้สีอะไร


ลองนำโค้ดนี้ไป paste ในส่วน body ดู นะครับ

หากตัวเลขมีค่าเท่ากัน สิ่งที่ประกาศไว้ลำดับสุดท้ายจะมีความสำคัญสูงกว่าครับ


???????</description>
		<content:encoded><![CDATA[<p>งงอ่ะ&#8230;&#8230;ตั้งแต่ตรงนี้</p>
<p>การคำนวณลำดับความสำคัญจาก การประกาศ class และ id<br />
ให้ a เป็นจำนวนของ id b เป็นจำนวนของ class และ c เป็นจำนวนของ tag html</p>
<p>#id1 {xxx} /* a=1 b=0 c=0 –&gt; เรียงตัวเลข abc = 100 */<br />
UL UL LI.red {xxx} /* a=0 b=1 c=3 –&gt; เรียงตัวเลข abc = 013 */<br />
LI.red {xxx} /* a=0 b=1 c=1 –&gt; เรียงตัวเลข abc = 011 */<br />
LI {xxx} /* a=0 b=0 c=1 –&gt; เรียงตัวเลข abc = 001 */</p>
<p>ตัวเลขมากกว่า จะมีลำดับความสำคัญที่สูงกว่า จะเห็นว่า id มีความสำคัญสูงกว่า class หากเรียก id และ class พร้อมๆกันลักษณะที่กำหนด จะเป็นไปตาม id</p>
<p>ตัวอย่าง</p>
<p>ul li.test{ color:blue; } /*012*/<br />
li.test{color:red } /*011*/</p>
<p>คุณว่าจะได้สีอะไร</p>
<p>ลองนำโค้ดนี้ไป paste ในส่วน body ดู นะครับ</p>
<p>หากตัวเลขมีค่าเท่ากัน สิ่งที่ประกาศไว้ลำดับสุดท้ายจะมีความสำคัญสูงกว่าครับ</p>
<p>???????</p>
]]></content:encoded>
	</item>
</channel>
</rss>
