Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > CSS
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 03-22-2006, 03:52 PM
  #1
expinch
Paladin (Level 15)
 
expinch's Avatar
 
Join Date: Apr 2004
Posts: 374
iTrader: (0)
expinch is on a distinguished road
Pure CSS Paging Problem

I've writing a paging control using pure css rollovers but I'm running into a few problems (using IE6 and Strict XHTML).

The paging mechanism amounts to an unordered list of links, each link has (or is supposed to have) a background image that changes based on the :hover pseudoclass. The first problem I am having is getting the background images to display (in their entirety) behind their corresponding links. The hover itself works, but the background image only shows up in the area where the contained link resides (which only amounts to a small portion of the image). I've tried to give both the <a> tag and the <li> tag heights and widths equal to the background image, but it still doesn't work.

The second problem I'm having is making the paging mechanism only as big as its contained elements. Because I'm floating each of the <div>s inside the main container, I can only set a background image on the innerContainer if I give it an exact width. But I don't want to have to give it a width as I want it go grow and contract as needed.

Finally, the first box in the paging mechanism is a <span> that should have a border, but only the left and right side borders show up? Works in Firefox.

Here is the html, css, and background images, thanks:

Code:
<div class="pagingContainer">  <!-- for positioning -->
  <div class="pagingInnerContainer">  <!-- for styling -->
    <div class="gotoSelect">
	  <span class="totalPagesBox">324 Pages <img src="images/smalldownarrow.gif" alt="" /></span>
    </div>
	<div class="pageSelect">
	  <ul>
        <li><a href="#">&laquo;</a></li>
        <li><a href="#">&lsaquo;</a></li>
        <li><a href="#">1</a></li>
        <li><a href="#">2</a></li>
        <li><a href="#" class="activePage">3</a></li>
        <li><a href="#">4</a></li>
        <li><a href="#">5</a></li>
        <li><a href="#">&rsaquo;</a></li>
        <li><a href="#">&raquo;</a></li>
      </ul>
	</div>
    <div class="recordSelect">
      <select>
        <option value="10">10</option>
        <option value="20">20</option>
        <option value="30">30</option>
        <option value="40">40</option>
        <option value="50">50</option>
        <option value="100">100</option>
      </select>	
      Records/Page
	</div>
    <div class="clear"></div>
  </div>
</div>
Code:
/* paging styles */
.pagingContainer {margin:10px 0px;}
.pagingInnerContainer {padding:3px 0px 0px 3px;background-color:#93a2bd;border:1px solid #5f6f7f;width:50%;}
/* Go-to styles */
.pagingContainer .gotoSelect {float:left;padding:2px 0px;}
.pagingContainer span.totalPagesBox {vertical-align:middle;background-color:#dadfe6;border:2px solid black;padding:3px;}

/* Paging link styles */
.pagingContainer .pageSelect {float:left;padding:2px;}
.pagingContainer ul {list-style-type:none;margin:0px 10px;padding:0px;}
.pagingContainer ul li {display:inline;padding:0px;margin:0px 5px;text-align:center;vertical-align:middle;}
.pagingContainer ul li a {background-image:url(mages/inactivePageBackground.gif);text-decoration:none;color:black;}
.pagingContainer ul li a:hover {background-image:url(images/activePageBackground.gif);text-decoration:underline;margin:0px;}
.pagingContainer ul li a.activePage {font-weight:bold;background-image:url(images/activePageBackground.gif);margin:0px;text-decoration:underline;}
/* Record Style */
.pagingContainer .recordSelect {float:left;vertical-align:middle;}
.pagingContainer .recordSelect select {background-color:#dadfe6;}
Attached Images
File Type: gif activePageBackground.gif (873 Bytes, 283 views)
File Type: gif inactivePageBackground.gif (873 Bytes, 215 views)
__________________
Create fantasy football cheat sheets on the web using drag and drop, for free.

Last edited by expinch : 03-22-2006 at 04:10 PM.
expinch is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-22-2006, 05:27 PM
  #2
_Aerospace_Eng_
The CSS Master (somewhat)
 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a galaxy far far away...
Posts: 11,154
iTrader: (0)
_Aerospace_Eng_ has disabled reputation
The links need to be display:block;
Then you can give them width and height. Its probably wise to get rid of display:inline; in your lis as well and use float:left; instead.
__________________

76 invites left. PM me for a Gmail invite along with email addy.
Why we won't help you .::. Web Developer's Handbook .::. Why Tables for Layout is Stupid?
_Aerospace_Eng_ is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-22-2006, 06:58 PM
  #3
expinch
Paladin (Level 15)
 
expinch's Avatar
 
Join Date: Apr 2004
Posts: 374
iTrader: (0)
expinch is on a distinguished road
Perfecto, that did it, thanks.
__________________
Create fantasy football cheat sheets on the web using drag and drop, for free.
expinch is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-08-2009, 03:34 PM
  #4
kntl
Novice (Level 1)
 
Join Date: Nov 2009
Posts: 1
iTrader: (0)
kntl is an unknown quantity at this point
CSS Paging with Tooltip, no JavaScript and no Image

i have created a paging with css. it has a tooltip for current page's and next-previous pages'. you can download and test it on my blog:

http://kntl.org/css-imageless-but-co...ipt-and-jquery

Last edited by Pegasus : 11-08-2009 at 09:13 PM. Reason: sig removed - you can have one after 30 days membership and 30 posts
kntl is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 06:53 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.