Jump to content


Photo
- - - - -

Boxes don't show bg img

bg img boxes

Best Answer Martin Davies , 05 July 2013 - 04:50 PM

try changing the file links from 

 

background-image:url('./wp-content/uploads/2013/06/venstreboks-uden-tekst.png');

 

to the full link for the file 

 

http://version2manom...-uden-tekst.png

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 bobbekaer

bobbekaer

    Advanced Member

  • Members

  • 89 posts
  • Framework Version:2.3.6
  • Country: Country Flag

Posted 05 July 2013 - 06:11 AM

Hi :-)

 

I am working on a site where I use boxes. I styled them with a background image and a fullwidth link. On the frontpage the are working just fine: 

Please Login or Register to see this Hidden Content

 

but when I try to add them to the members ares they show the link - but not the background image! 

Please Login or Register to see this Hidden Content

 

But it is the exact same box-set?

 

What is happening?

 

Thanks,

Bolette



#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 05 July 2013 - 01:05 PM

Hello Bolette,

 

I found:

Please Login or Register to see this Hidden Content

That's incorrect CSS.  You should use the full URL, not a shortened version as ./.  It should be "background-image: url(".

Please Login or Register to see this Hidden Content

");" You also do not need to prefix it with body.

 

I'm not seeing a particular cause for this, except that no-where do I see any specific code for the a activity.

 

You should also use Firebug to go through the various levels, as some of the CSS is causing overlap.  You have 55px padding on either side, for example, of one element (below) that's bleeding into the next box.   See: 

Please Login or Register to see this Hidden Content

It could be that because you add a link, that element pushes everything and makes the background vanish.



#3 bobbekaer

bobbekaer

    Advanced Member

  • Members

  • 89 posts
  • Framework Version:2.3.6
  • Country: Country Flag

Posted 05 July 2013 - 01:41 PM

Hi Rob

 

I haven't added the body - it is done after I put the 

 

#box-diverse {

background-image: url("./wp-content/uploads/2013/06/venstreboks-uden-tekst.png");
background-position: left top;
background-repeat: no-repeat;
display: block;
height: 103px;
width: 292px;
}

 

into the Custom CSS. 

 

And I can see the problem with the padding - but it doesn't explain why the same boxes in the same set is showing fine on the frontpage? 

 

 



#4 Martin Davies

Martin Davies

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 05 July 2013 - 04:50 PM   Best Answer

try changing the file links from 

 

background-image:url('./wp-content/uploads/2013/06/venstreboks-uden-tekst.png');

 

to the full link for the file 

 

Please Login or Register to see this Hidden Content



#5 bobbekaer

bobbekaer

    Advanced Member

  • Members

  • 89 posts
  • Framework Version:2.3.6
  • Country: Country Flag

Posted 10 July 2013 - 11:28 AM

Thank you Rob and Martin - it worked and after a few days of fretting about it, I guess I can live with the curiosity on why it worked to begin with on one page and not another..."the code works in mysterious ways" :-D

 



#6 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 12 July 2013 - 01:23 PM

As long as it works! That's what counts.  Happy to help!







Also tagged with one or more of these keywords: bg img, boxes