Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-12-08 14:29:20
- bobfet1
- New Member
- Registered: 2006-07-07
- Posts: 3
Aligning images with CSS problem
I am trying to set up the CSS so that when I put an image into a post, it floats the image on the right side by default. I also want to be able to float it on the left, or have it blocked in the center, so I put in classes for those.
The problem is that I can’t seem to get the other classes to work. Even if I try an in-line style, the images in my posts always go to the right. Is there a problem with the CSS I am using? The website is http://www.ploob.com
#main img {
border: 0;
margin-left:5px;
margin-bottom:5px;
float:right;
}
img.left {
margin-left:0px;
margin-right:5px;
}
img.centered {
display:block;
margin-left:auto;
margin-right:auto;
}
Offline
Re: Aligning images with CSS problem
This is what I use for floating images.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#3 2006-12-08 15:36:45
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Aligning images with CSS problem
With ID selectors I think you need to be more specific and change the rules to #main img.left
and #main img.centered
Offline