473,809 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS: putting text block to the right of an image

Hello,

I'm trying to create the following effect:

IMG text
para-
graph

["text paragraph" is a large multi-line text paragraph that is taller than
the image. It needs to be entirely to the right of the image]

This can easily be done by using a table and putting the image inside of one
column and the text inside of the next. But, I want to do it with CSS instead
of tables.

I can get almost where I want by setting a "float: left" style on the image
and then following it with the text paragraph, but what I get is something
like this:

IMG text
para-
graph

i.e. The text paragraph wraps from the side of the image to below it. Is
there a way to keep the text from wrapping like this?

Thanks,
Scott
-----------------------------------------------------------
Posted using Android Newsgroup Downloader:
.... http://www.sb-software.com/android
-----------------------------------------------------------
Nov 25 '06 #1
1 2414
Els
sc***@nospam.co m wrote:
I can get almost where I want by setting a "float: left" style on the image
and then following it with the text paragraph, but what I get is something
like this:

IMG text
para-
graph

i.e. The text paragraph wraps from the side of the image to below it. Is
there a way to keep the text from wrapping like this?
Yup - give the paragraph a left margin as wide as the floated image.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Nov 25 '06 #2

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

Similar topics

5
1192
by: speel | last post by:
Ok i'am just learning CSS and just fiddling around with it. Now what my problem is I want to position a div with a image in it to any position i want but i cannot for the life of me figure it out. So hopefully one of you guys can. So here is my code. <html> <head> <style type="text/css"> #image { left: 31px;
4
8678
by: Dave | last post by:
TIA for the help.....this should be easy for a pro....I need the two divs with text to display on the same line at the top of the container..??? <html> <head> <style> body {background-color: $background-color; background-image:url('') ; font:normal $global-font-size $text-font; text-align:center;
14
8336
by: Zhang Weiwu | last post by:
Hello. I have been using word processor like OOO for nearly 10 years and such layout is very usual to me: gopher://sdf.lonestar.org/I/users/weiwu/ooo_wrap_correctly.png but I found it's very difficult to achieve the same layout with HTML/css. The best result I can achieve is like this: gopher://sdf.lonestar.org/h/users/weiwu/Expectation.xml
3
4223
by: charchap | last post by:
hello. I'm experiencing problems with my css code (once again) working with Firefox and not working with IE 6 or 7 I have a problem with my head_logo_inner not too sure what's going on . Here is my css for this particular template. body{ background-color: #333333; color: #333333; margin: 0px; padding: 0px; font-size: 0.8em;
5
5494
by: David Housman | last post by:
Hello, I'm trying to implement a navigation bar with a ul in css. The code is a template, but i'm customizing. I can handle just text in each block, but i want the first block to have an image and then text, which I'm doing with a span element. I think i need it that way to handle text positioning of the text. So there's an anchor block, and inside4 that i'm putting an image and a span block.
7
2297
by: skoggins | last post by:
Hi all, On this page http://69.80.211.183/ in my FF 2.0.0.12 browser, the issue is the vertical white border I am trying to use to separate the right sidebar from the main content. The border sometimes appears and sometimes does not--seemingly at random when I refresh the page. If you use the forward button and then the back button on the browser the border always appears. Sometimes using Firebug will cause it to appear. Also, you may...
27
3916
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. random div's everywhere Is there any other way? Also I'm trying to get a scaled thumbnail of the orginal picture WHILE maintaining the size of the css box.. Is that possible? Or do I have to scale it in Photoshop and make a separate image =\
3
2031
by: Steve | last post by:
Hi All I have an asp.net 2.0 website with the following css file It uses Master pages and in Firefox 3.04 for windows only, 3 of the web pages don't display the Master page properly The content page overlaps the Master page boundaries In IE 6/7 All works fine
1
2496
by: dustylane | last post by:
I know very little about HTML and CSS but I've been able to decipher most of what I've needed to know based on trial and error. I had a friend coding me a website long ago and he abandoned the project but gave me what he had finished. I modified it to fit my needs, but now I'm at a stop. I have these sliding gallery tabs that I need to be able to click and they will open the galleries below them. I know I need to add in some sort of CSS...
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9200
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.