I have a button on one of my pages in wordpress and I want to float it to the right because right now it is floated left.
Can I do that with css since its created using shortcode? If so, what would I edit?
I have a button on one of my pages in wordpress and I want to float it to the right because right now it is floated left.
Can I do that with css since its created using shortcode? If so, what would I edit?
You must be logged in to post a comment.
Shortcode is just a shortcut for outputting normal, pre-formatted HTML. You can write a CSS rule to style the element(s) but it depends on the markup the shortcode is generating:
CTRL+U
.id
s orclass
names on or above the generated elements.style.css
file in your theme folder.It’s possible that your rule will be overridden by another style; shortcode providers often “sandbox” CSS with inline styling, so that a user’s other styles don’t interfere with their elements. The quickest solution is to add the
!important
override to your rule, e.g.:This overrides future inline styling on the element.