Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    78
    Thanks
    19
    Thanked 1 Time in 1 Post

    Thumbs up Page Links ( Pagination ) help please

    hi I made a pagination css and i would like to know to make it function ? do i need any javascript or php required? please help me.

    This is the Live Demo
    Live Demo


    This is Style

    Code:
    @charset "utf-8";
    /* CSS Document */
    html,body{
    	margin: 0px;
    	padding: 0px;
    	background: #FFFFFF 0px 0px;
    }
    #wrapper{
    	width: 1006px;
    	background: transparent url(../images/main_back.png) repeat-y;
    	margin-right: auto;
    	margin-bottom: 5px;
    	margin-left: auto;
    }
    .pagination{
    padding: 2px;
    }
    
    .pagination ul{
    	margin: 0;
    	padding: 0;
    	text-align: center; /*Set to "right" to right align pagination interface*/
    	font-size: 16px;
    }
    
    .pagination li{
    list-style-type: none;
    display: inline;
    padding-bottom: 1px;
    }
    
    .pagination a, .pagination a:visited{
    padding: 0 5px;
    border: 1px solid #9aafe5;
    text-decoration: none; 
    color: #2e6ab1;
    }
    
    .pagination a:hover, .pagination a:active{
    border: 1px solid #2b66a5;
    color: #000;
    background-color: #FFFF80;
    }
    
    .pagination a.currentpage{
    background-color: #2e6ab1;
    color: #FFF !important;
    border-color: #2b66a5;
    font-weight: bold;
    cursor: default;
    }
    
    .pagination a.disablelink, .pagination a.disablelink:hover{
    background-color: white;
    cursor: default;
    color: #929292;
    border-color: #929292;
    font-weight: normal !important;
    }
    
    .pagination a.prevnext{
    font-weight: bold;
    }
    This is MarkUp

    Code:
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>pagination</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    </head>
    
    <body>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <div class="pagination">
    <ul>
    <li><a href="#" class="prevnext disablelink">« previous</a></li>
    <li><a href="index.htm" class="currentpage">1</a></li>
    <li><a href="1.htm">2</a></li>
    <li><a href="2.htm">3</a></li>
    <li><a href="3.htm">4</a></li>
    <li><a href="4.htm">5</a></li>
    <li><a href="5.htm">6</a></li>
    <li><a href="6.htm">7</a></li>
    <li><a href="7.htm">8</a></li>
    <li><a href="#">9</a>...</li>
    <li><a href="#">15</a></li>
    <li><a href="#">16</a></li>
    <li><a href="#" class="prevnext">next »</a></li>
    </ul>
    </div>
    
    </body>
    </html>
    Last edited by zoe20; 12-08-2009 at 06:45 PM.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    hi I made a pagination css and i would like to know to make it function ? do i need any javascript or php required?
    Yes, if your data is stored in a DB, you need to use some server side script to query the results from DB. And you don't have to statically write all the links in the pagination, instead the script will dynamically generate it for you. Search for pagination inside "PHP snippet" sub forum.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    zoe20 (12-09-2009)

  • #3
    New Coder
    Join Date
    Feb 2009
    Posts
    78
    Thanks
    19
    Thanked 1 Time in 1 Post
    thanks but can i use css only to run this?

  • #4
    New Coder
    Join Date
    Feb 2009
    Posts
    78
    Thanks
    19
    Thanked 1 Time in 1 Post
    sorry or the bump. Can use only css to run this one properly? as am not godo at php. Please help me.

    regards
    zoe


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •