Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-05-06 10:10:40

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

images xhtml output

I don’t know if there are others who agree with me but it would be better(?) if the xhtml output for the images used styles instead of the current output… Hard to explain but here is what i mean:

<img src="http://neme.org/main/images/143.jpg" width="700" height="450" alt="foo" />: existing

<img src="/images/143.jpg" alt="foo" style="height:700px;width:450px" />: proposed (If I remember correctly this is how it was in v4.0.3)

Reason: with styles it is easier to add other attributes like floats/borders/etc


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#2 2007-05-06 10:57:33

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: images xhtml output

Hmm… but you can still use a style attribute for borders and such, even if the dimensions of the images are set in the width/height attributes.

To me, the height and weight of an image are not part of the style, but rather they are intrinsic properties of the image. They don’t define how the image looks (using it to scale images gives poor quality results in most browsers), but what the image is. If similar properties existed for paragraphs, perhaps they’d be called “words” and “sentences” ;)

Last edited by ruud (2007-05-06 10:59:24)

Offline

#3 2007-05-06 12:54:14

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: images xhtml output

Adding inline style to images goes against the whole concept of keeping presentation and content separate. You may have individual times when adding inline style is necessary, for example adding style=“width: 100%” so your image stretches in a flexible layout. But to have inline style as a default takes away the designer’s choice. It overrides external css and css in the head of the document. I could go on… there are many reasons why this would be a no no.


BB6 Band My band
Gud One My blog

Offline

Board footer

Powered by FluxBB