[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

Wordpress image aligncenter issue

I have a test site here and I am trying to align the image to the center.  I am using the latest version of Wordpress.  In the Visual editor it looks perfect but live it's not centering.  In the editor I am clicking on the image and in Image Details > Display Settings I simply click Align Center.  Do I need to alter something in my css.  I have tried this method but it is not working.
0
livewirewebsolutions
Asked:
livewirewebsolutions
  • 4
  • 3
1 Solution
 
Joshua GrantomSenior EngineerCommented:
this site is setup for members only so we cannot see the content of your post.
0
 
livewirewebsolutionsAuthor Commented:
sorry, try this post
0
 
Joshua GrantomSenior EngineerCommented:
in the visual editor change to HTML mode and add a <p style="text-align:center;"></p> around the image and link. It will look like this.

<p style="text-align:center;"><a href="http://curl.livewiire.com/wp-content/uploads/2014/05/curl4-e1407801100972.jpg"><img class="aligncenter size-medium wp-image-1168" src="http://curl.livewiire.com/wp-content/uploads/2014/05/curl4-300x200.jpg" alt="curl4" height="200" width="300"></a></p>

Open in new window


make sure it is only wrapped in one <p></p> tag
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
livewirewebsolutionsAuthor Commented:
yes, but my client is doing this with the site.  he won't understand the coding.  Any other fixes?
0
 
Joshua GrantomSenior EngineerCommented:
yea, highlight the image and hit the align center for paragraph, should do the same thing
0
 
livewirewebsolutionsAuthor Commented:
I tried that and it hasn't worked.
0
 
livewirewebsolutionsAuthor Commented:
can anyone help me with this please.  It can't be that difficult.
0
 
Hube02Commented:
In order for the styles applied for alignment in the WYSIWYG editor to apply to the font-end your CSS style sheet must contain the correct selectors.

These selectors are standard and required for a theme to be approved for inclusion in the WP repo. A list of the WP generated classes can be found here: http://codex.wordpress.org/CSS
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now