I am trying to achieve pagination in my page .
<span height="40px"><span class="pg-normal" onclick="pager.prev();"> « Prev </span>
|
<span id="pg1" class="pg-selected" onclick="pager.showPage(1);" style="display: block;">1</span>
<span id="sp1" style="display: block;">|</span>
<span id="pg2" class="pg-normal" onclick="pager.showPage(2);" style="display: block;">2</span>
<span id="sp2" style="display: block;">|</span>
<span id="pg3" class="pg-normal" onclick="pager.showPage(3);" style="display: block;">3</span>
<span id="sp3" style="display: block;">|</span></span>
it is almost done except this CSS problem.
i have created a JSFIDDLE. i want the result in single line which it is not coming.
any help will be very useful.
Thats because they all have the style
display: blockit takes them out of the inline tekst flow and puts them on a seperate line.Here is a fiddle that works:
http://jsfiddle.net/sg3s/bGMa9/2/
If you want to style them like block elements but not make them leave tekst flow you can use
display: inline-blockor make them a block level element but usefloat: left;to make them sit next to each other.