0

Can you use CSS in YML tags?

If so, CSS does not work on the <yml:image> tag.

by
6 Replies
  • QUOTE (HenryS @ Nov 20 2008, 03:19 PM) <{POST_SNAPBACK}>
    If so, CSS does not work on the <yml:image> tag.
    0
  • I am not from Yahoo.

    This is confusing but this is how it works.

    You can use CSS in both Small View and Canvas View.

    You can include inline CSS to assign id and class to the html tag <div> and <img>.
    0
  • http://developer.yahoo.com/yap/yml/image.html

    Attributes
    Name Type Required/Optional Description
    src string required Source file of the image (.gif, .jpg, .png).
    alt string optional Alternate text associated with the image. Defaults to an empty string
    height numeric optional Height in pixels of the image.
    width numeric optional Width in pixels of the image.

    yml:image only support above attributes. It didn't indicate it support css type of attributes. I use <div> ouside <yml:image> and it won't apply css style to <yml:image>.

    Yahoo! please add more styles to yml:image
    0
  • Updated. Now I am able to use few css styles such as vertical-align and float on <div> outside <yml:image>, <yml:profile>.
    0
  • QUOTE (vivaty.menlopark @ Nov 25 2008, 10:58 AM) <{POST_SNAPBACK}>
    Updated. Now I am able to use few css styles such as vertical-align and float on <div> outside <yml:image>, <yml:profile>.

    fyi - you dont need to use yml:img - using the regular img tag should just work. We'll update our documentation to refelect this.

    X
    0
  • This is very confusing. Can we use both html image and yml:image tag on Small View?
    0
  • Yes, both regular HTML and YML are acceptable on the small view. When on the developer dashboard, if you open an open application there is a note at the bottom that states "The default content displayed by the Small view. HTML and YML only.". YML acts in tandem with HTML instead of as a replacement for it.

    Jonathan LeBlanc
    Senior Software Engineer
    Yahoo! Developer Network

    QUOTE (vivaty.menlopark @ Nov 26 2008, 04:15 PM) <{POST_SNAPBACK}>
    This is very confusing. Can we use both html image and yml:image tag on Small View?
    0

Recent Posts

in YAP