We just got a new custom logo for our site and would like to have it centered. We tried to play with the CSS but perhaps just didn't have the right coding in. So how do we do this?
Thanks
We just got a new custom logo for our site and would like to have it centered. We tried to play with the CSS but perhaps just didn't have the right coding in. So how do we do this?
Thanks
What coding did you try?
#header {
align: center;
{
.header-img {
align: center;
}
We went to the CSS panel not sure if that was the correct spot or not as well...
align is not a CSS property, but try this article for centering things http://www.w3.org/Style/Examples/007/center.en.html
.header-image {
margin-top: 24px;
margin-top: 2.4rem;
display: block;
margin-left: auto;
margin-right: auto }
placed this into the CSS as directed by the link. But its still not working. Do we need to identify the source img and if so what does that format look like...? src..?
Thanks for your help btw if you couldn't tell we're novices to editing CSS lol
It looks like you're missing a width style from that code.
.header-image {
margin-top: 24px;
margin-top: 2.4rem;
display: block;
margin-left: auto;
margin-right: auto;
height: 300px;
width: 300px; }
and still no luck...
Where are you adding the code?
In the edit CSS panel. Though I had to go into the advanced code to pull the proper classes because before I didn't have them identified correctly.
Is the CSS panel named, "Custom CSS" or similar?
if you could post a live link to your site, someone can check the code and possibly suggest something to center the header image.
As you've stated you were incorrectly selecting the image, have you resolved this?
yes
I'm sorry this is not resolved I never heard back about suggestions on the code
Can you apply your code;
.header-image {
margin-top: 24px;
margin-top: 2.4rem;
display: block;
margin-left: auto;
margin-right: auto;
height: 300px;
width: 300px; }
To the correct element?
the correct element is:
.site-header img
I applied the suggested code and it didn't move the item center at all. The height and width properties also distorted the image dimensions.
The problem is, the element containing it has a small set width, therefore the image can only centre within that small width [screenshot].
Try using a Browser Developer tool for this kind of CSS exploratory work. I used Google Chrome's built-in developer tool in that example.
Once you sort out that width, you can sort out the image's width that is distorted.
THANKYOU! redefined the width and it worked!!!!
You must log in to post.