Log in

View Full Version : text alignment



fredsampson
12-16-2008, 09:27 PM
I am at last able to paste up jpeg and gifs from a small camera to my website. I position these pictures using CSS. I cannot get the text to align around the picture. It leaves a big blank gap alongside the picture. Help please?:(

diltony
12-16-2008, 09:35 PM
One solution to do that is by using a table like this:
<table>
<tr>
<td><img src="foolish.picture.jpg"></td>
<td>My Text</td>
</tr>
</table>
And if u are still having problems, please let me know, i may give u some php code to trim or crop your picture automatically
like <img src="php/image.php?source=foolish.picture.jpg"> or something like that....

bluewalrus
12-17-2008, 12:31 AM
Try floating the image and the text in separate div's. I could be more specific with code or a link. Also try the css forum.

Schmoopy
12-17-2008, 12:37 AM
Please for the love of web design avoid tables... (unless you're displaying tabular data) use CSS like bluewalrus has said, to be more specific - something like this:



CSS:
.lefty{
float:left;
margin-right:10px;
}


HTML:
<img src="images/yourimage.jpg" alt="myimage" class="lefty"/>
Here is my text bla bla bla
Here is my text bla bla bla
Here is my text bla bla bla
Here is my text bla bla bla
Here is my text bla bla bla


Then adjust the margins to your needs.

fredsampson
12-20-2008, 11:57 AM
I apologies for not making my requirement very clear but when using WORD I type my pages of text and when and as is required I insert a picture from file and then format the text in the text alignement box and get it (the text ) to wrap in many different ways around or besides the jpeg. I now want to do this using CSS so maybe I am in the wrong forum and should move over to the one dealing with CSS. I have attempted your reply without success.

bluewalrus
12-20-2008, 03:26 PM
Post your code or a link here or in the css one.

fredsampson
12-20-2008, 09:51 PM
Thank you - here it is...

http://www.fredsampson.co.uk/aa-reports08-09/NCClub13dec08.html

- here it is

bluewalrus
12-21-2008, 05:37 PM
I put a float left in the image tag itself. You should really consider not using word for coding.


<img src="SuzyBerry.jpg" width=520 height=390 border=0 alt="SuzyBerry" style="float:left;">

Twey
12-21-2008, 05:57 PM
Yes, Word is not a web-design application (not that it would be much better if it were). You should learn to write pages yourself (http://www.howtocreate.co.uk/) — it's not difficult, and will give you greatly superior pages.

fredsampson
12-23-2008, 11:49 AM
Sorry to confuse yet again but I certainly dont use WORD to code anything. I prepare my written text in WORD then use MS Front Page/Amiasoft SiteAid and Terrapin FTP to get my pages to my host 'Fasthosts' and onto my website www.fredsampson.co.uk. Thank you for your help and it was the 'float' attribute that I was looking for. :o

fredsampson
12-23-2008, 11:54 AM
Sorry to confuse yet again but I certainly dont use WORD to code anything. I prepare my written text in WORD then use MS Front Page/Amiasoft SiteAid and Terrapin FTP to get my pages to my host 'Fasthosts' and onto my website www.fredsampson.co.uk. Thank you for your help and it was the 'float' attribute that I was looking for.

bluewalrus
12-23-2008, 02:21 PM
Front page is taking the code from Microsoft Word, formatting it that way, and applying it then.

In your code...

<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">

There's a lot of stuff in that page you do not need. Might consider trimming it done. Not on the link you just posted but on the other page....On the link you just did post though you should close this div

<div id="comein" style="position:relative;left:-10;font:italic bold 24px Bradley Hand "<div>RESUL

<div id="comein" style="position:relative;left:-10;font:italic bold 24px Bradley Hand "><div>RESUL