Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem in freezing header

Problem in freezing header

Scheduled Pinned Locked Moved ASP.NET
cssarchitecturehelp
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NidhiKanu
    wrote on last edited by
    #1

    Hi all I am using this css for freezing header .Divcontainer { /* So the overflow scrolls */ width:98%; /* Style */ border: 1px solid black; } .Divcontainer table th { /* Keep the header cells positioned as we scroll */ position: relative; top: expression(this.offsetParent.scrollTop - 2); /* Style */ font-weight: bold; height:20px; background-color:#51c2d0; font:bold 11px Tahoma; color:#000000; text-align: center; } .Divcontainer table th a { /* Style */ color:#000000 ; text-decoration: underline; text-align: center; font-size:11px; font-weight:bold; } .Divcontainer table th a:hover { /* Style */ color:#ffffff ; text-decoration: underline; text-align: center; font-size:11px; font-weight:bold; } and this is my div that contain gridview component inside it.

    My code working well for header frezzing but in case of using dropdown control in grid,all dropdown covers header means when i move up mouse cursur then all dropdown goes up even on header. N!dh! :)

    A P 2 Replies Last reply
    0
    • N NidhiKanu

      Hi all I am using this css for freezing header .Divcontainer { /* So the overflow scrolls */ width:98%; /* Style */ border: 1px solid black; } .Divcontainer table th { /* Keep the header cells positioned as we scroll */ position: relative; top: expression(this.offsetParent.scrollTop - 2); /* Style */ font-weight: bold; height:20px; background-color:#51c2d0; font:bold 11px Tahoma; color:#000000; text-align: center; } .Divcontainer table th a { /* Style */ color:#000000 ; text-decoration: underline; text-align: center; font-size:11px; font-weight:bold; } .Divcontainer table th a:hover { /* Style */ color:#ffffff ; text-decoration: underline; text-align: center; font-size:11px; font-weight:bold; } and this is my div that contain gridview component inside it.

      My code working well for header frezzing but in case of using dropdown control in grid,all dropdown covers header means when i move up mouse cursur then all dropdown goes up even on header. N!dh! :)

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      Just use this CSS Class

      .HeaderFreez
      {
      position:relative ;
      top:expression(this.offsetParent.scrollTop);
      z-index: 10;
      }

      and Set Gridview Header Style to that CSS

      For more you can Read This Article[^]

      cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net

      1 Reply Last reply
      0
      • N NidhiKanu

        Hi all I am using this css for freezing header .Divcontainer { /* So the overflow scrolls */ width:98%; /* Style */ border: 1px solid black; } .Divcontainer table th { /* Keep the header cells positioned as we scroll */ position: relative; top: expression(this.offsetParent.scrollTop - 2); /* Style */ font-weight: bold; height:20px; background-color:#51c2d0; font:bold 11px Tahoma; color:#000000; text-align: center; } .Divcontainer table th a { /* Style */ color:#000000 ; text-decoration: underline; text-align: center; font-size:11px; font-weight:bold; } .Divcontainer table th a:hover { /* Style */ color:#ffffff ; text-decoration: underline; text-align: center; font-size:11px; font-weight:bold; } and this is my div that contain gridview component inside it.

        My code working well for header frezzing but in case of using dropdown control in grid,all dropdown covers header means when i move up mouse cursur then all dropdown goes up even on header. N!dh! :)

        P Offline
        P Offline
        Paddy Boyd
        wrote on last edited by
        #3

        There are a couple of techniques out there for 'shimming' an iframe under the div that contains your header. The iframe should be z-index behind the div and will 'hide' the dropdownlists.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups