473,406 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to float text around image

Hello,
What I would like is to float some text around the image where the text
starts align on the left or right of the image aligned to the top of the
image and then wrap around the image. I have tried using the .imgright
{float: right;} or .imgleft {float: left;} in my draft css. I have looked at
other suggestion on the net by using a span class but I am having problems
adding it to my <div class="contpara" now such luck.
Here is my draft css:

BODY {
BACKGROUND-IMAGE: url(graybg.gif); BACKGROUND-REPEAT: repeat-y;
BACKGROUND-COLOR: #ffffff
}
LI {
FONT-SIZE: 12px; COLOR: #0000cd; FONT-FAMILY: Georgia, "Times New Roman",
Times, serif; LIST-STYLE-TYPE: square
}
UL {
COLOR: #0000cd; LIST-STYLE-TYPE: square
}
..contpara {
FONT-SIZE: 12px; LINE-HEIGHT: 120%; FONT-FAMILY: Georgia, "Times New
Roman", Times, serif
}
H1 {
FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #0000cd; FONT-FAMILY: Verdana,
Arial, Helvetica, sans-serif; LETTER-SPACING: 2px
}
A:link {
COLOR: #669999; TEXT-DECORATION: underline
}
A:visited {
COLOR: #999999; TEXT-DECORATION: underline
}
A:hover {
COLOR: #000000; TEXT-DECORATION: underline
}
A:active {
COLOR: #000000; TEXT-DECORATION: underline
}

..imgright {
float: right;
padding: 10px;
}

And then I added this to my draft.html
<div class="contpara">
<H1>test</H1>
<P><img src="tttest" width="100" height="100" class="imgright"
alt="test">Once test blah blah blah.</P>

Thanks for your help in the past
Jul 21 '05 #1
2 6150
in comp.infosystems.www.authoring.stylesheets, mike wrote:
Hello,
What I would like is to float some text around the image where the text
starts align on the left or right of the image aligned to the top of the
image and then wrap around the image. I have tried using the .imgright
{float: right;} or .imgleft {float: left;} in my draft css. I have looked at
other suggestion on the net by using a span class but I am having problems
adding it to my <div class="contpara" now such luck.
¨Your description does not make sence
Here is my draft css:

Snip of lots of irrelevant code I would need to change to get it work.
Thanks for your help in the past


Rather give URL. Or at least some code that makes some sence with some
description that makes sence.

Questions:
1. URL(s)
2. What is what you want to happen?
(3. If you get something work somehow, what change makes it not work?`)

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Jul 21 '05 #2
Possibly the page:
http://www.nsm88.com/articles/mossad...%20jailed.html
and its associated .css page will solve the problem for you.

I found that I had to add an extra <p> tag to get the text to line up
properly with the top of the image on

http://www.nsm88.com/articles/amsterdam_mosque.html

Both pages use the same very basic css page.
"Lauri Raittila" <la***@raittila.cjb.net> wrote in message
news:MP************************@news.individual.ne t...
in comp.infosystems.www.authoring.stylesheets, mike wrote:
Hello,
What I would like is to float some text around the image where the text starts align on the left or right of the image aligned to the top of the
image and then wrap around the image. I have tried using the .imgright
{float: right;} or .imgleft {float: left;} in my draft css. I have looked at other suggestion on the net by using a span class but I am having problems adding it to my <div class="contpara" now such luck.


¨Your description does not make sence
Here is my draft css:


Snip of lots of irrelevant code I would need to change to get it work.
Thanks for your help in the past


Rather give URL. Or at least some code that makes some sence with some
description that makes sence.

Questions:
1. URL(s)
2. What is what you want to happen?
(3. If you get something work somehow, what change makes it not work?`)

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Gustav Medler | last post by:
Css only offers float:right; and float:left; Is it possible, to center an image, floated around by text? Cross browser funcionality is needed for NS4.7, IE 5.x, Op 6.x, Moz 1.x, Konqu 3.x. I...
1
by: Aaron | last post by:
I'm using relative positioning to move a right-floated image 10px upwards.. Text wrapping around the image should go underneath it once it reaches the bottom of the image, yet it acts as if the...
4
by: Florian Brucker | last post by:
Hi! I've got a problem with float & clear. Take this example code: <div style=" width:100px; height:100px; background-color:#FF0000; float:left; margin:10px;"></div> <span...
9
by: steven | last post by:
Hi, I can float the image left or right so the text will float around it, but only if the top of the image is aligned with the start of the paragraph. I'd like the image be a little below that, so...
0
by: Paul E Collins | last post by:
Hello. I want to display a number of individual blocks of text. Each block has an associated image, which should be displayed on the right and aligned with the top of its block of text, i.e....
9
panachepad
by: panachepad | last post by:
I arrived here from a websearch that found this thread from your archives: http://www.thescripts.com/forum/thread97805.html It helped me to understand that I am on the right track, but I still have...
8
by: DarkSaturn | last post by:
Is there a method of using the CSS float command on images to contain itself within a single paragraph? The problem I'm running into is trying to use float images on a listing page, I have an...
6
by: battle.chris | last post by:
Hi all. Any advice appreciated - I'm floating an image right and the text to the left of the image is being forced down about 5px from the top of the containing area. You can see the issue...
27
by: GloStix | last post by:
WARNING VIDEO TAKES A WHILE TO LOAD http://screencast.com/t/BWQ6DNtsM I really don't know how to fix this other than putting another div. But I dont' exactly want to do that for every page....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.