- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 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.
Hi I would like to center all the images in in my sidebar div but I dont know the code to do this. I know to use
for centering text but not for an image.
Here is what I have got so far:
#sidebar img {
}
this is just a guess, and I could be completely wrong (it’s all trial and error for me, so I’m still learning what works and what doesn’t); but try this:
What has worked for me with aligning images especially in the sidebar has been setting it as the background-image. This maybe a newbie move being I just completed my first CSS site. I just seem to have better flexibility when I do it this way. The text seems to play better as well.
I used the text-align: center; in my sidebar div which then centered the text.
Again the god of CSS design has done it.
Thanks Chris :P