การทำ header และ footer ให้อยู่ลอยกับที่ (Div float on screen)

การทำ header และ footer ให้อยู่ลอยกับที่ (Div float on screen)

ทำให้ div ลอยอยู่ด้านบนและด้านล่าง โดยที่ไม่เลื่อนตาม Scroll Bar ครับ เหมาะสำหรับใครจะเอาไปประยุกต์ใช้เป็น Menu Bar
.pageheader
{
      width:100%;
      height:50px;
      background-image:url(images/topbar.png);
      position:fixed;
      top:0;
      z-index:99;
}


.pagefooter
{
    width:100%;
    height:50px;
    background-color:#282828;
    position:fixed;
    bottom:0;

    z-index:99;
}


ตัวอย่างการใช้งาน

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
      .pageheader
      {
          width:100%;
          height:50px;
          background-color:#282828;
          position:fixed;
          top:0;
          z-index:99;
      }
      .pagefooter
      {
          width:100%;
          height:50px;
          background-color:#282828;
          position:fixed;
          bottom:0;
      }
    </style>
</head>

<body>
  <div>
        <div class="pageheader"></div>
        <div style="width:300px;height:600px;margin-left:auto;margin-right:auto;background-color:#099;"></div>
        <div style="width:300px;height:600px;margin-left:auto;margin-right:auto;background-color:#9C0;"></div>
        <div class="pagefooter"></div>
  </div>
</body>
</html>


http://www.training.ami-solution.com/ami-knowledge/knowledge.php?cntid=81#.VX5PzOJr-Ls


ID=2487,MSG=2823


⭐️ เราให้คำแนะนำปรึกษา รักษาผลประโยชน์ให้ลูกค้า ของเรา
⭐️ เราอยู่เคียงข้างลูกค้าของเรา ช่วยเหลือ ดูแลบริการ
⭐️ เรารองรับช่องทางติดต่อมากมาย สะดวก เข้าถึงง่าย
⭐️ เราดำเนินธุรกิจยาวนานกว่า20 ปี คุณจึงมั่นใจได้
⭐️ คุณมีสามารถรับบริการทั้งจากบริษัทประกันเจ้าของสินค้า และ เรา (ตัวกลาง)

ไทย มีราว 80 บริษัทประกันภัย สินค้าที่แตกต่าง ทั้ง เงื่อนไข ราคา เคลม ความมั่นคง นโยบาย ฯลฯ
ขายผ่านตัวกลาง กว่า 500,000 ราย : ตัวแทน นายหน้า ธนาคาร บิ๊กซี โลตัส ค่ายรถยนต์ เฮ้าส์แบรนด์ ของประกันภัย หรือ ซื้อตรงกับบริษัทเจ้าของสินค้า
⭐️ ตัวอย่าง การบริการ กดดูที่ลิงค์นี้

"สิ่งที่ต้องคำนึงอันดับแรกในการซื้อประกัน คือ ตัวกลางประกันภัย ซึ่งจะเป็นที่ปรึกษา ช่วยเหลือ ดูแลเรา ตลอดอายุกรมธรรม์"

โปรดรอ

display:inline-block; position:relative;
โทร.(จ-ศ : 9-16) เว้นวันหยุดฯ , ลูกค้าเรา บริการ 24/7/365 , Tuesday เวลา 06:06:47am เปิดทำการ 9.00
Copyright © 2018 Cymiz.com., All rights reserved.นโยบาย,ข้อตกลงcymiz.com