Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
text wrap around an image
sorry i put this into the wrong section
is there a way to make text wrap around an article image in the excerpt and body?? i searched and found 1 post but it didnt help :(
Last edited by blazin6543 (2006-07-18 03:42:35)
Offline
Re: text wrap around an image
<a href=“http://textpattern.net/wiki/index.php?title=Txp:article_image_/”>TextBook</a>
Use the <code>align</code> attribute, which accepts the same values as the equivalent IMG tag would.
<em>Never mind. See below.</em>
Last edited by Elenita (2006-07-18 05:17:41)
Offline
Re: text wrap around an image
do you mean put align=“left” on article_image? because i tried that and nothing…. unless you mean something completely different
Offline
Offline
Re: text wrap around an image
Walker’s right. You should probably use a CSS rule, as the align attribute has been depreciated anyway.
Offline
#6 2006-07-18 07:31:17
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: text wrap around an image
<txp:article_image style="float: left;" />
Offline
Re: text wrap around an image
ok thanks tons the float works great….. but now …. if there isnt a lot of text the next article actually comes up as well … both articles are to the right of the image instead of just the one and the next article being on a new line…. anyway to fix that? :(
Offline
Re: text wrap around an image
have a <code>clear:both</code> css rule in between articles
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: text wrap around an image
im sorry but im not that experienced with css i just started using it probably a month or so ago :( where exactly do i put the clean rule? also i want to add that the comment form follows the body so it l00ks a little odd
Last edited by blazin6543 (2006-07-18 15:59:43)
Offline
Re: text wrap around an image
<blockquote>1 more thing ;) the text of the body is rubbing right against the image is there a way to pad or use a margin? i tried adding padding to the body but no go :(</blockquote>
You would have to use the <code>margin</code> attribute, like: <code><txp:article_image style=“float: left; margin: 5px;” /></code>. Margins define the space around elements, and padding define the space between an element and its border.
(Quick question for those more knowledgeable than me: has the <code>align</code> attribute for the <code><txp:article_image /></code> been depreciated?)
Last edited by Elenita (2006-07-18 16:12:40)
Offline
Re: text wrap around an image
ya i actually figured that margin part out thats why i edited my post ;) thanks anyways though….. still unclear about the clear:both though
Offline
Re: text wrap around an image
Following certain forum threads on here, I did it this way:
In my CSS I added:
<pre>img.content {
margin: 6px 6px 0 4px;
padding: 0 6px 0 4px;
float: left;
}</pre>
In an article I use:
<code><txp:image id=“95” class=“content” /></code>
It works for me but I’m open to other alternatives.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline