+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Dec 2008
    Posts
    2

    Default Pagination Centering Issue

    I am having issues with the pagination number portion not centering due to paths of the url which is part of Zend Framework which I use. For example:

    Code:
    http://mydomain.com/admin/Customer/list
    Everything else renders properly as I do full paths to the css files. It's just the pagination page number portion that does not render properly.

    You can also reproduce this by just putting the css and js in a folder below your html file then referencing it by ../css/general.css

    You can fix it in the ../ case by making a css folder in the same folder as your html file. You can even leave the ../css/general.css reference which makes things really strange like the js portion which centres the pag_list is sensitive to the path of the css? I really don't know where the exact cause is just a guess.

    So is there a way to make this work as expected when the css folder is not in the expected location.

  2. #2
    Oxylus Octav's Avatar
    Join Date
    May 2008
    Posts
    9

    Default

    Hello,

    We are curently on vacation, but we'll look into this on 2nd-3rd January and if there's an issue we'll fix it at once.

    All the best,
    Octav

  3. #3
    Junior Member
    Join Date
    Jan 2009
    Posts
    9

    Default

    Hello,

    The css file that centers the pagination list, is included dinamically in css.js (js/css.js). You have to edit this line in the css.js:

    document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/js.css\" media=\"screen\" />");

    The path is written in bold.

    Please let me know if you encounter other problems.

    All the best,
    Marian

  4. #4
    Junior Member
    Join Date
    Dec 2008
    Posts
    2

    Default

    Interesting way of doing that. I'm guessing I can just as easily just drop in

    Code:
    <link rel="stylesheet" type="text/css" href="css/js.css" media="screen" />
    Then the javascript doesn't really matter? Seems to be working fine for me and solves the paths issue for my application.

  5. #5
    Junior Member
    Join Date
    Jan 2009
    Posts
    9

    Default

    Quote Originally Posted by InFloW View Post
    Interesting way of doing that. I'm guessing I can just as easily just drop in

    Code:
    <link rel="stylesheet" type="text/css" href="css/js.css" media="screen" />
    Then the javascript doesn't really matter? Seems to be working fine for me and solves the paths issue for my application.
    Well ...the idea was to make the template work with or without javascript enabled. I couldn't center the pagination list only with css, because the width of the list is relative. The css rules found in js.css are :

    .pag_list {

    visibility: hidden;

    position: absolute;

    top: 0;

    left: 50%;

    }

    I also needed to set a 'margin-left' rule to the list equal to -1/2 of its width, which is set by this js code from behaviour.js as soon as the webpage is loaded:

    function centerPagList () {

    var pag_list = getElementsByClass('pag_list',null,'ul');

    for(i=0; i<pag_list.length; i++) {

    pag_list[i].style.marginLeft = 0 - pag_list[i].offsetWidth/2 + 'px';

    pag_list[i].style.visibility = 'visible';

    }



    }

    I used 'visibility: hidden' in js.css, because the javascript code executes after the webpage has loaded (without images), and i didn't want the user to notice the pagination list jumping from left to center. Besides 'margin-left', the javascript function also sets 'visibility: visible'.


    If you disable javascript in your browser, you won't see the pagination list
    because js.css isn't included with javascript anymore.

Similar Threads

  1. Comment Submit button issue in Blog Module
    By PeteCas in forum inFocus - Powerfull Professional Template with CMS and E-Shop
    Replies: 0
    Last Post: 12-01-2011, 06:10 PM

Bookmarks

Posting Permissions

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