Css:- Fixed position

<!DOCTYPE html> 

<html> 

 

<head> 

 <meta name="viewport" content="width=device-width, initial-scale=1"> 

 

 <style> 

  .fxd_cls { 

   position: fixed; 

  } 

 </style> 

</head> 

 

<body> 

 <div class="fxd_cls"> 

  This div is always on top 

 </div> 

 

 <pre> 

10 

11 

12 

13 

14 

15 

16 

17 

18 

19 

20 

21 

22 

23 

24 

25 

26 

27 

28 

29 

30 

31 

32 

33 

34 

35 

</pre> 

 

</body> 

 

</html>




Output:-    This div is always on top
 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 


Used of:-

Fixed Position


    Which means the position won't change even if the page is scrolled.

Css:- Fixed position Css:- Fixed position Reviewed by Network security on May 09, 2019 Rating: 5

No comments:

Useful Information

Powered by Blogger.