PSD TO CSS And Preview Code

  • View CSS
  • View HTML
  • Preview
  • คำอธิบาย
  • /*Design CSS Layout by ozinepank*/
    
    body {background:url("images/bg-dot.png") repeat scroll center top transparent; margin-top:16px; font:normal 13px/1.5 'Helvetica', Arial, sans-serif;}
    a:link,a:visited {color:#2B96F1;text-decoration:none; }
    a:hover { text-decoration:underline;}
    a img {border-width:0;}
    /*wrap*/
    #wrap , #page{width:980px;margin:0 auto;}
    #wrap {padding-bottom:100px; min-height:100%;}
    #head {width:980px;margin:30px 0 0;}
    #logo { width:228px; margin:0 auto; height:80px;position:relative;}
    #logo  a  { background:url(images/logo_sub.png) no-repeat scroll 0 0 transparent; left:0; display:block; padding:0; margin:0;text-indent:-99999px; text-align:center;}
    /*page*/
    #page {background:#F5F5F5; box-shadow:0 0 1px #000000; width:950px; padding:15px;}
    #main {width:100%;}
    #main .colum_item{float:left;}
    .colum_item h3 ,h4 {display:block; padding:10px 0; margin:15px 0 10px; border-bottom:1px solid #BBB; text-indent:-999999px;}
    .colum_item p {font-size:14px; color:#333;line-height:1.4444em; margin-bottom:1em;}
    .colum_item .left{width:450px;margin-right:50px;}
    .colum_item .right{width:450px;margin-right:0;}
    /*left*/
    .colum_item .left h3 {background:url(images/bgh2_1.png) no-repeat scroll 0 0 transparent;}
    .colum_item .left h4 {background:url(images/bgh2_3.png) no-repeat scroll 0 0 transparent;}
    /*right*/
    .colum_item .right h3 {background:url(images/bgh2_2.png) no-repeat scroll 0 0 transparent;}
    .colum_item .right h4 {background:url(images/bgh2_4.png) no-repeat scroll 0 0 transparent;}
    /*price_class*/
    .colum_item .right .price {padding:0 0 90px;margin: 5px 0; width:100px; float:left; border-right:1px dotted #DDD;}
    .price-box {position:relative; float:left; margin-right:6px; left:10px; background:#f05b3a; display:block; border-radius:5px; padding:10px; font-size:22px; color:#FFF;}
    .box-price {display:block;margin-bottom:4px;}
    .relative {position:relative; top:4px; left:8px;}
    .clear-right {margin-right:0;}
    
  • index

    Hello Welcome Now!

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book

    Hello I', GEEK!!

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book

    Portfolio!

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book

    Prices

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem

    1 Day / $500 :) 2 Day / $900 :)

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem

    Movie Production : $15,000/Day
  • สวัสดีขา Dev.ทั้งหลาย ( Web Developer )

    นี้เป็นตัวอย่างการใช้เจ้า Codeme ในการช่วย present Portfolio ครับ ผมตั้งใจขึ้นมาแจกฟรี มันง่ายครับหากคุณเคยใช้ SyntaxHighlighter มาก่อน มันเหมาะหากจะเอาไปส่ง portfolio สมัครงานหรือนำเสนอผลงานลูกค้า เหมาะยังไง? ก็เหมาะสิเค้าดูโค้ดได้เลยไง ว่าคุณเขียนพอไปวัดไปวาได้บ่ :) หากจะแก้ไขให้ได้ดั่งใจคุณ ผมขอแนะเปิดด้วยโปรแกรมเขียนโค้ด Notepad+++ แล้วเขียนโค้ดด้วยตัวคุณเองโลดครับ

    ***ข้อควรระวัง อย่าไปยุ่งกับ folder ที่ชื่อว่า Synax น่ะ ( แต่ถ้าเข้าใจลึกซึ่งก็ลองยุ่งเลยครับของแบบนี้มันต้องลอง :D) เพราะอาจทำให้คุณเขียนโค้ด present ลงไปในหน้าเพจ Codeme แล้วไม่แสดงผลโค้ดออกมา ที่สำคัญอีกประการถ้าคุณเข้าใจหลักการแล้ว แนะนำลองเพิ่ม สไตล์ซีตภายนอก External style sheets [*.css] หรือจะเป็น JavaScript [*.js] มาใช้ให้การนำเสนองานของคุณ ให้มันดูมันเป็นมือชีพสุดๆไปเลยขอรับ

    ***สำคัญอีกประการ ภายใต้ Tag ID : section_preview อย่าใช้ pre เด็ดขาด ให้เขียนเป็น HTML ปกติ และไม่ต้องใช้ body เพราะ object มันคลอบด้วย body อยู่แล้ว ฉนั้นเสืออยู่ถ้ำเดียวกันไม่ได้ ?
    แล้วจะทำยังไงในเมื่อต้องการใช้ background ที่อยู่ในชีตอื่นที่เป็น external style sheets และมันก็ถูกกำหนดเป็น body มาด้วย?? แนะนำกำหนดจาก body เป็น Tag ID แทน ( งง ไช่เปล่าหละ ???) งั้นเรามาลองสมมุติเหตุการณ์กันเลย

    เช่น ผมเขียน external style sheets มาซีตหนึ่งชื่อว่า present.css ซึ้งมีโด้ดเป็นแบบนี้

    		body{background:url("images/bg-dot.png") repeat scroll center top transparent;}
    		/*ไม่กล่าวถึงในส่วนอื่น เพราะปัญหามันอยู่แค่ตรง body*/
    		

    แล้วจะแก้ปัญหายังไงเมื่อตรงภายใต้ ID : section_review จะต้องใช้ background ในชีต present.css ด้วยน่ะดิ ( ก็ คือ body ของชีต present.css นั้นแระๆ ) แนะนำอย่างนี้ครับให้ไปแก้ body โดยการกำหนดเป็น ID แทน เฮ็ดจั่งได๋น่ะหละนายอำเภอ Rankgo! ง่ายนิดเดียวแก้เป็นแบบนี้ครับ
    		#presen {background:url("images/bg-dot.png") repeat scroll center top transparent;}
    		/*เปลี่ยน body เป็น #present แทน*/
    		

    แล้วใช้ยัง ??? เขียนอย่างนี้ครับ
    		
  • /*จะได้ background จาก present.css ตามต้องการ*/
    ตรงนี้แล้วแต่อยากเขียนอะไร


  • สรุปโดยรวมก็ได้เป็นแบบนี้ครับ
    • 		     /*post css*/
      	    
    • /*post html ไม่ต้องใส่
      */
      	
    • post present text



    ใน file แนบที่ให้ download มีสองไฟล์ คือ portfolio-preview.html และ Example.html อันแรกผมทำเป็นตัวอย่าง ส่วนอันหลังลองไปแก้ไขใช้กันดูครับ ตัวนี้เป็นตัว beta v1.0 ขยันหย่อยก็จะออก v1.1 หากมีข้อสงสัยในการใช้งานคอมเม้นสอบถามได้เลยน่ะครับ ไปคุยกันได้ที่นี้ครับ www.fb.com/Codeme