Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-10-01 20:01:24
- zadine
- New Member
- Registered: 2006-09-29
- Posts: 4
Cant validate xhtml 1.0, missing image alt
Hi!
My problem is that I have images alt=“tekstehere” to every picture in Pages preset site, but none of them are shown in actual site. Why? How about the uploaded images, do they suppose to add automatically alt function to image tags?
Because of that i can’t get valid XHTML 1.0
Thanks…
Offline
Re: Cant validate xhtml 1.0, missing image alt
You should get valid XHTML out of the box. Content>Images>Edit Image details (or upload a new image), enter in alternate text in the “Alternate Text” field. You have to add it manually, as TXP doesn’t know what the image represents.
Offline
#3 2006-10-01 20:29:09
- zadine
- New Member
- Registered: 2006-09-29
- Posts: 4
Re: Cant validate xhtml 1.0, missing image alt
Ok, that worked for uploaded images inside article, but still cant get images written in code to work.
I have this in my page template:
< txp:img src=“images/grey_header.gif” width=“580” height=“127” alt=“header” / >
but when I check source code from mainpage, I get this:
< img src=“http://www.greyinside.net/g2/images/grey_header.gif” / >
Why textpattern does that?
Last edited by zadine (2006-10-01 20:30:07)
Offline
Re: Cant validate xhtml 1.0, missing image alt
It’s because your tag doesn’t exist. You use txp:image for TXP images, but just use plain HTML in your template:
<img src="/images/grey_header.gif" alt="header" / >
Also, you’ll want to link the image relative to the root (/images/grey_header.gif) or absolutely (http://…) for your sections (ie when on /news/, the browser would look for /news/images/grey_header.gif).
Offline