|
|
#1 (permalink) |
|
Junior Member
Join Date: Dec 2008
Posts: 2
|
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 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. |
|
|
|
|
|
#3 (permalink) |
|
Junior Member
Join Date: Jan 2009
Posts: 9
|
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 (permalink) |
|
Junior Member
Join Date: Dec 2008
Posts: 2
|
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" /> |
|
|
|
|
|
#5 (permalink) | |
|
Junior Member
Join Date: Jan 2009
Posts: 9
|
Quote:
.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. |
|
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT. The time now is 11:08 AM.









Linear Mode
