CSS to align image in the center
-
Hi, I am looking for the CSS to align an image? I have tried a couple of alternatives none of which seem to work. Is the float option correct?
<img width=”470″ height=”90″ float=”center”
src=”xxx” class=”site-logo attachment-oxygen-logo”
alt=”logo_1396015_print” data-size=”oxygen-logo”>The blog I need help with is: (visible only to logged in users)
-
Have you got a Custom Design upgrade? That html seems to be the image logo markup. We cannot edit it. Float is not what we use and center is not a valid value for float property.
Please confirm that you have Custom Design upgrade so I can come up with CSS :-)
-
Is it possible the image is nested within more layers? I have limited CSS experience. I also tried align=”center” which did not work. Yes I have the Premium package so I have custom design.
Thanks for your help!
-
-
Thank you so much! So judging by that methodology if I have the following code it should move the main section correct? It doesn’t seem to be,
#main {
text-align: left;
}Also one other quick question, if I want to specify distance to get a desired distance from a border for example? Using the masthead example? Do you have any suggestions for good css tutorials? Thanks again for your help.
-
That CSS won’t move the mains section left. Main section should be floated or margin etc should be adjusted to make it appear move left.
Distance between the border and the content is padding.
These are the good places to start learning CSS:
http://dailypost.wordpress.com/2013/06/21/css-intro/
http://dailypost.wordpress.com/2013/07/25/css-selectors/
http://dailypost.wordpress.com/2013/08/29/css-matched-rule-pane/http://en.support.wordpress.com/custom-design/css-basics/
http://en.support.wordpress.com/custom-design/editing-css/These pages have links to additional resources.
- The topic ‘CSS to align image in the center’ is closed to new replies.