0

I'm including a CSS file in the head of my wicket page (wicket 1.6) using <wicket:link> tags and it loads fine.

However links to images in my css e.g background-image: url(xxx/xxx/pic.png); wont load.

How do i get wicket to recognise the links to my resources(images) in my css file and change them like when i include <wicket:link><img src="xxx/xxx/pic.png"></wicket:link> in my HTML.

Osher
  • 5
  • 2
  • are you sure that the css file loaded fine ? check the console for not found file erros please – Ahmed Gamal Apr 05 '16 at 09:08
  • yes all my normal styling works just the images don't load. the problem is that my image folder is not in the same directory as my pages folder. I was just wondering if there was a fix whereby i could keep the two folders seperate. – Osher Apr 05 '16 at 09:34
  • 4
    check this also http://apache-wicket.1842946.n4.nabble.com/Images-referencing-in-CSS-with-Wicket-td3569363.html the images have to live next to the css file – Ahmed Gamal Apr 05 '16 at 09:37
  • @AhmedGamal please convert your comment to an answer :) – Rob Audenaerde Apr 08 '16 at 07:00
  • @RobAu i wrote it as an answer – Ahmed Gamal Apr 08 '16 at 08:30

1 Answers1

1

The images have to live next to the css file, i.e. be in the same directory.

check the following link : http://apache-wicket.1842946.n4.nabble.com/Images-referencing-in-CSS-with-Wicket-td3569363.html

Ahmed Gamal
  • 1,666
  • 1
  • 17
  • 25