Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-06-21 16:54:41

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

images not displaying from my css styling

Hi,

Ive just put my css and html pages in to textpattern. Ive named them both and saved them. Ive then created a new section and made it use these new css/html pages.

When ive viewed this section in a browser only the images that ive put img src in the html display. All the images ive placed using css ( such as background-image: ….jpg) so not display.

Ive tried uploading the images to textpattern and using the <txp:image:> code but that doesnt work.

Could anyone suggest what im not doing??

Last edited by elduderino (2006-06-21 16:55:12)

Offline

#2 2006-06-21 17:12:00

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: images not displaying from my css styling

I guest the your refer the imags relative:

<pre><code>background:url(../img/a-pic.jpg)</code></pre>

Refer the absolute from your root

<pre><code>background:url(/img/a-pic.jpg)</code></pre>

Or somthing like that, if you run txp in a sub:

<pre><code>background:url(/a-dir/img/a-pic.jpg)</code></pre>

Offline

#3 2006-06-21 17:16:25

TNT
Member
From: Rotterdam, Netherlands
Registered: 2006-01-06
Posts: 256
Website

Re: images not displaying from my css styling

You have to change the names of the images in your css-file. Instead of the name you have to insert the txp-id of the image. For example, change header.jpg to 1.jpg, assuming that the id of header.jpg is 1.


Prrrrrrrr

Offline

#4 2006-06-22 11:44:52

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: images not displaying from my css styling

Hi guys, thanks for the replies. Yep that resolved it. I just needed to give the whole path back to my images in my host folder!

Thanks!

Offline

Board footer

Powered by FluxBB