- This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hey, I need some help, please help me.
I have an image in footer, I don’t know why but image slides down.
Image size: width 150px, height 150px.
http://codepen.io/anon/pen/JXjjvq
#footer {
height: 150px;
width:891px;
background-color: darkblue
.footer_img {
background-image: url(/theme/spring/p1.png);
background-position: 100% 0; /* right corner position */
background-repeat: no-repeat;
height: 150px;
}
.footerText {
text-align: center;
}
Please provide a functional demo…
But one thing I can see is that the above style is missing a closing bracket for #footer
.
I’m not sure what you mean by “image slides down”, the image (I replaced your broken link with a placeholder) seems aligned as it should be.
I checked it in Chrome, FF and IE11 on windows 7
I did notice that the footer was being pushed down by the paragraph in .footerText
, so you just need to remove the default margin for the paragraph.
Thank you guys!
Sorry, but what you mean “remove the default margin for the paragraph”?
.footerText {
text-align: center;
margin: 0;
}
right?
No, I mean for the paragraph (p element) so:
.footerText p{
margin:0;
}
By default, most browsers give paragraphs a margin of some sort.
yee, thank you! it works! But now my
text is in the top of the footer!
Please tell me how it can be a bit lower?
(p) Copyrights © 2016 (/p)
(p)<?php get_site_credits(); ?><br>
Theme by mysite.com (/p)
.footerText p {
text-align: center;
margin:0;
}
I would do it like so, using display-table/table-cell:
http://codepen.io/kvana/pen/grOpXE
It does require you to restructure your html a little though. You’ll have to either put all of the footer text into a single paragraph element, or you’ll have to wrap the paragraphs in another div.
bearhead, thank you so much!!! Im very happy now.