How can I get those arrows you have in display for my website? I think they look much better than what I have.

CommentFileSizeAuthor
sample.jpg2.42 KBazwildcat

Comments

mattyoung’s picture

Status: Active » Closed (fixed)

You do it with CSS background image styling.

nravens’s picture

Status: Closed (fixed) » Active

Anyone know how to do this with CSS? Sorry for the rookie question but I'm getting nowhere fast with this...

mattyoung’s picture

Here is the CSS:

ul.pager li a {
  margin: 0;
  padding: 3px 6px;
  color: transparent;
}

li.pager-first {
  background: transparent url('pager-first.png') no-repeat center center;
}

li.pager-previous {
  background: transparent url('pager-previous.png') no-repeat center center;
}

li.pager-next {
  background: transparent url('pager-next.png') no-repeat center center;
}

li.pager-last {
  background: transparent url('pager-last.png') no-repeat center center;
}

The first rule make the text of Frist, Prev, Next, Last links invisible. The rest of the rules add the appropriate background images to each links.

You can use Firebug to see the HTML markup and what CSS target to.

nravens’s picture

Thanks for this...much appreciated. I'll give a go now.

azwildcat’s picture

The images for those arrows would reside in the themes folder with the path of sitename/sites/default/themes/mytheme, right? They would not reside in the drpager module folder, right? So I would have direct the CSS code to the proper path from my site’s root directory?

nravens’s picture

I added this CSS to the drpager.css file, is that not correct? The image path must be ok because it shows in firebug but it's not showing on the actual page I need it to.. so I'm thinking maybe I added this to the wrong file?

the url for the page is "http://www.countryviewguesthouse.co.za/image-gallery" if that helps...

mattyoung’s picture

>I added this CSS to the drpager.css file

No, don't do this. Never hack any contrib module or core. There are multiple ways to add custom css without having to hack core or modules.

Let's say you have the pager-arrows.css css file and the arrow image file(s).

You can copy them all into your theme folder, edit the theme's .info file and add the stylesheet with this declaration in the .info file:

stylesheets[all][] = pager-arrows.css

This is better than hacking contrib module or core but still not ideal because it's still modifying theme.

A better way is to use the CSS Injector module, setup the custom arrows CSS through the CSS injector interface, copy all the image files to the site's file directory.

The way I did it is with a custom module. I use module to do custom theming so that I can upgrade/change theme easily. See http://hddigitalworks.com/theming-cck-content-type on how this is done.

nravens’s picture

Thanks for your help. I can't seem to get the images to display so I eventually just made the arrow white for now so that it's visible on the black background.. that will have to do until I have time to figure out why the images aren't being pulled through... The fact that I can edit the pager-arrows.css file to change the colours, etc must mean that the css file is in the correct location but I assume my image path for the pager-next.png and pager-previous.png arrow images is wrong...

mattyoung’s picture

Status: Active » Closed (fixed)