![]() |
![]() |
![]() |
|
|
#1 (permalink) |
|
Serious Contributor
Join Date: Jan 2006
Location: 127.0.0.1
Posts: 1,683
|
I'm working on a site where I want to be able to float images left or right AND have the text wrap around. I select the float in the image uploder and it adds the class .alignleft. .aligncenter,or .alignright.
I added this in my css file: img.alignright {float:right; margin:0 0 1em 1em} img.alignleft {float:left; margin:0 1em 1em 0} img.aligncenter {display: block; margin-left: auto; margin-right: auto} a img.alignright {float:right; margin:0 0 1em 1em} a img.alignleft {float:left; margin:0 1em 1em 0} a img.aligncenter {display: block; margin-left: auto; margin-right: auto} based on this turorial Wrapping Text Around Images WordPress Codex Still doesn't work. When I preview the post or page in the visual editor it shows the text wrapping, but when I publish the text does not float around the images. Any ideas? |
|
|
|
|
|
#3 (permalink) |
|
from accounting
Join Date: Oct 2005
Location: California
Posts: 16,581
|
If you are trying to align the images inside a post, I assume you have a class called "content" or "entry" or something like that.
You can use something like ... Code:
#content img {
margin: 0;
max-width: 640px;
overflow: hidden;
}
#content .attachment img {
max-width: 900px;
}
#content .alignleft,
#content img.alignleft {
display: inline;
float: left;
margin-right: 24px;
margin-top: 4px;
}
#content .alignright,
#content img.alignright {
display: inline;
float: right;
margin-left: 24px;
margin-top: 4px;
}
#content .aligncenter,
#content img.aligncenter {
clear: both;
display: block;
margin-left: auto;
margin-right: auto;
}
#content img.alignleft,
#content img.alignright,
#content img.aligncenter {
margin-bottom: 12px;
}
__________________
Contact me for ad inquiries | Sales at Askdamagex dot com Hosting for ADX provided by Swiftwill |
|
|
|
![]() |
| Thread Tools | |
|
|