Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » add an image?

#1 2006-02-23 20:53:29

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

add an image?

Hi there,

Ive created my own page template and all works well. Ive attached my own styles to this using my own style sheet in the style tab.

Ive created a sidebar div and placed a background image on it. In Skedit (my code editor) the code previews fine and the background image displays correctly.

Now that ive brought it in to textpattern it doesnt seem to work; The image does not display.Heres the code ive used in my style:

background: url(slidingbckgrnd.gif) repeat-y 70% 0;

Can anyone tell me how i get images to display in textpattern? Ive searched the FAQ and manual but cant find anything that explains my problem

Thanks

Offline

#2 2006-02-23 21:02:17

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: add an image?

background: url(slidingbckgrnd.gif) repeat-y 70% 0;

Where did you upload your image in the server?
I would bet this is a problem of relative URLs.

That line should be

background: url(/slidingbckgrnd.gif) repeat-y 70% 0;
or
@background: url(/images/slidingbckgrnd.gif) repeat-y 70% 0;

Or whatever is the path to your image.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2006-02-23 21:23:19

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

Re: add an image?

Hi Manquini,

Right ive tried that line in my styles but its made no difference.

I havent uploaded my image anywhere, ive just gone to content> images and uploaded it there. So im assuming the path would be url(/images/slidingbckgrnd.gif) Is that correct? Theres three links below with different tags each one indicating the the images id is 3.gif. what should i do?

Last edited by elduderino (2006-02-23 21:27:01)

Offline

#4 2006-02-23 21:33:27

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: add an image?

> elduderino wrote:

Hi Manquini,

It’s Maniquí ! ;) (well, you can write it without the accent if you want!

I havent uploaded my image anywhere, ive just gone to content> images and uploaded it there. So im assuming the path would be url(/images/slidingbckgrnd.gif) Is that correct?

So, the correct path will be

url(/images/3.gif)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2006-02-23 21:40:21

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

Re: add an image?

Hi Maniqui, sorry was typing your name fast-i was close!

No, ive tried that code and it doesnt work. Im definitely editing the correct style template. Ive checked in sections. Any ideas what it could be?

url(/images/3.gif)

Offline

#6 2006-02-23 22:00:25

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: add an image?

hi eldurino

first, check if the image is ther, by trying to load it in your browser:

Put… http://www.yourdomain.com/images/3.gif

If it is not there, we have to found where is it.

Also, validate your CSS, to see if everything is ok

CSS Validator

Last edited by maniqui (2006-02-23 22:02:08)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#7 2006-02-23 22:06:20

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

Re: add an image?

Hey you spelt mine wrong now!!

Right ive done both of them. The image displays against a greyish background when i put my domain followed by /images/3.gif. Ive also validated my code and its fine!

Whats going on?

Ive just checked the tag thats generated in the images section for the textpattern one and it is as follows:

<txp:image id=“3” />

does this change anything

Last edited by elduderino (2006-02-23 22:12:15)

Offline

#8 2006-02-23 22:11:37

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: add an image?

> elduderino wrote:

> Hey you spelt mine wrong now!!

Ops! Sorry!
But you do it twice
jajajaja! ;)

So, the image is in its place… You have validated your CSS

Did you try your site with another browser just to see if the background image is not there too?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#9 2006-02-23 22:18:14

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

Re: add an image?

aha! You got me! Well remembered! I just spelt it like what it looked like of you get what i mean…..i never really checked the spelling!

No unfortunatley ive tried that aswell

Ive just checked the tag thats generated in the images section for the textpattern one and it is as follows: textpattern img id =‘3’

does this change anything?

Last edited by elduderino (2006-02-23 22:21:55)

Offline

#10 2006-02-23 22:26:38

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: add an image?

You cant use TXP tags inside the CSS.

So, your image is now named as 3.gif.

You simple need to point the correct URL in your CSS, that, as said before, should be:

background: url(http://www.yourdomain.com/images/3.gif)… and the rest of your rule…

Then, if still not working, maybe the page isnt loading the correct stylesheet.
Did you check that?
Look at the page source.

Or better: do you use Mozilla Firefox? Try the Web Developer Toolbar Extension

Install it and then, press CTRL+SHIFT+E and check if the correct stylesheet is loaded.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#11 2006-02-23 22:39:53

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

Re: add an image?

Hi !

I use omniweb as my default browser and it doesnt work here but it does work in Firefox, IE and Safari!

I think i can get that worked out!

Thanks for your help Maniqui

Offline

#12 2006-02-23 22:43:25

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: add an image?

you are welcome, dude! ;)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

  1. Index
  2. » Archives
  3. » add an image?

Board footer

Powered by FluxBB