Topic: float an image

I want to float all images to the left
with text wrapping it to the right.

How can I achive this?

2 (edited by bingiman 2008-01-04 02:56)

Re: float an image

<div><span style="float: left;"><img alt="" src="../../img/blank.gif"></span>
<span style="float: right;">This is my text</span></div>

Re: float an image

bingiman wrote:
<div><span style="float: left;"><img alt="" src="../../img/blank.gif"></span>
<span style="float: right;">This is my text</span></div>

This is correct for html but not for posting in punBB.
I hope to adjust a css page to make it universal for all posts.
Any tips on this?

Re: float an image

An image tag should be <img src="" alt="" />.

Welcome to my WoW guild site, the Eternal Reach.

You can also visit Chita, a site built by me, a feral paradise for feline animals.

Re: float an image

img { float: right; }

Re: float an image

Meowmeow wrote:

An image tag should be <img src="" alt="" />.

It does not matter. Once it is in the line. It works for me the way I showed him and it is also w3c approved.

Re: float an image

bingiman wrote:
Meowmeow wrote:

An image tag should be <img src="" alt="" />.

It does not matter. Once it is in the line. It works for me the way I showed him and it is also w3c approved.

The alt attribute is required for image tags wink

8

Re: float an image

I believe they were debating the placement, i.e: src alt versus alt src.

Re: float an image

Silly me, I somehow missed that in the original code wink

Re: float an image

MattF wrote:

I believe they were debating the placement, i.e: src alt versus alt src.

Or more importantly the fact that the <img> tag should be self closing.

11 (edited by MattF 2008-01-06 22:58)

Re: float an image

Oops. I never noticed that trailing slash missing. big_smile Must admit, I always use the <img ... /> method.

12 (edited by Hob Bramble 2008-01-07 01:01)

Re: float an image

momotaro - if you want all images users include in posts/signatures to be floated to the left, there are two places you could work from:

A: You could edit your include/parser.php file. Look around line #300 - it's where the BBCode image tags get turned into HTML.
B: You could edit your style/imports/base.css file. Look around line #199 - that's where you'll find the CSS for images in posts.

I'd recommend option B, as it's much simpler. However, with option A and some tweaking, you could make floating optional via BBCode.

-Master Hob Bramble of Willowbottom

Pardon me, good sir, but it appears that your diving apparatus has a leak.
Perpetual Thursday | Alternative-Internet.com | hobbramble.deviantart.com