Thread Starter
moz261
(@moz261)
hi again,
I tried this in plugin admin in tempplate field :
<div align=”center”>%video%</div>
no way 🙁
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
You need to link a page with the issue. The HTML “align” attribute is deprecated.
Normally just using the centring option in the editor against the shortcode works but it’s really down to how your theme is set-up. Can you provide a link to a page where it’s happening?
David.
Thread Starter
moz261
(@moz261)
hi,
as the article is in draft mode i can’t publish the link for the time being, sorry.. on monday i ‘ll ..
Nonetheless i tried this instead :
<p style=”text-align: center;”>
[youtube]https://www.youtube.com/watch?blac[/youtube]</p>
and it works..but do you think that is the right method as i use a “align” attribute ?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Don’t use the “align” attribute.
moz261 – yes, that looks spot on to me.
Andrew – no sure what you mean. The CSS align attribute is perfectly fine and WordPress (including the MCE editor) uses it all the time.
David.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
I’m not saying anything controversial. The HTML align attribute has been deprecated for many years. I’d say 4+ years, please keep up to date.
You’re correct – the HTML one has, but the second suggestion of the poster was to use the text-align attribute in CSS, which is not deprecated, and you told him not to use that either.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
and it works..but do you think that is the right method as i use a “align” attribute ?
Don’t use the “align” attribute.
I would say I have as much responsibility to encourage people to write good code as you do.
I think you’ve got it confused. Because you’d told him, quite rightly, before to not use the HTML align statement he was querying whether the CSS text-align solution was correct too. Which it is. But, yes, you’re right to point out good/bad coding but I think there’s just been some confusion here as to what he meant second time around. The CSS solution is good and it works.
David.
Thread Starter
moz261
(@moz261)
@andrew : tks for your response
@dartiss : tks for the developpement of such plugin and your comments
@both of you for the discussion…