开发者

rss: cannot put style attribute into an img tag

I am building an rss feed and i have this for description:

string sDescription = "<a href=\"" + sLink+"\"><img style=\"padding:10px\" align=\"left\" style=\"padding:10px\" width=\""+CImageDimensions.getProductImageDetailedWidth(CCategorii.CARTI_ID,
        book.Carti_id) + "\" src=\"" + PathsUtil.getBaseUrl() + control.ResolveUrl(ImageUtils.getThumbnailUrl(book.Poza_1)) + "\"/></a><div style=\"padding: 10px\"><p>" + b开发者_如何学运维ook.Descriere_mica + "</p></div>";

You see that i put a little bit of padding to the img attribute:

style=\"padding:10px\"

I do not understand why this is not loaded...I mean, in FF i see:

<img width="130" align="left" src="http://localhost:2440/gramma_prod/Images/Carti/Opere_complete_si_scoliile_Sfintului_Maxim_Marturisitorul1.Dionisie Aeropagitul_thumb.jpg"/>

All others attributes of img tag are taken correctly but style is missing...

Do you have any ideea why?


It's possible that not all the CSS features are supported in displaying RSS. In fact, RSS should only send information, not information about how to render the information within. Try this attributes: hspace and vspace. An example here: http://www.w3schools.com/TAGS/att_img_hspace.asp

Hope you the best luck!


You will need to HTML encode the output. http://msdn.microsoft.com/en-us/library/w3te6wfz.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜