Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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