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 the text appears above, left and
below the image. The text is a single paragraph.
Thanks for any help.
Steven 9 5029
steven wrote: 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 the text appears above, left and below the image. The text is a single paragraph.
My solution is to place the image in a <span> that is inserted within
the paragraph text a few lines below the start of the text. Try this CSS:
..imgleft, .imgright {
font-size: 90%;
font-style: italic;
padding: 1em;
text-align: center;
}
..imgleft {
float: left;
}
..imgright {
float: right;
}
<p>
Here is a bunch of text ...
Here is a bunch of text ...
Here is a bunch of text ...
<span class="imgright ">
<img ...> <br>A caption here
</span>
Here is a bunch of text ...
Here is a bunch of text ...
Here is a bunch of text ...
</p>
See an example at my site: http://www.freezeblock.com/
...the picture of the house. Since the page works for any browser
width, the amount of text above will vary with that width. Place the
<span> where you think it works best.
--
-bts
-This space intentionally left blank.
"Beauregard T. Shagnasty" <a.*********@ex ample.invalid> wrote in message
news:32******** *****@individua l.net... steven wrote:
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 the text appears above, left and below the image. The text is a single paragraph.
My solution is to place the image in a <span> that is inserted within the paragraph text a few lines below the start of the text. Try this CSS:
.imgleft, .imgright { font-size: 90%; font-style: italic; padding: 1em; text-align: center; } .imgleft { float: left; } .imgright { float: right; }
<p> Here is a bunch of text ... Here is a bunch of text ... Here is a bunch of text ... <span class="imgright "> <img ...> <br>A caption here </span> Here is a bunch of text ... Here is a bunch of text ... Here is a bunch of text ... </p>
Good idea! Thanks.
Steven
Beauregard T. Shagnasty wrote: My solution is to place the image in a <span> that is inserted within the paragraph text a few lines below the start of the text.
The trouble with that approach is that you have to be careful with your alt
text and caption, otherwise you end up with something like this:
Traditional gutters are prone to blockage, especially in winter when
ice jams push water back up under the roofing material and damage
fascia boards and A house suffering from an ice dam
House with ice dam interior walls. In warmer climates, heavy rains and
blocked gutters cause the same problems.
.... which is nonsensical.
--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
David Dorward wrote: ... which is nonsensical.
I agree. <g> Have you a better solution?
--
-bts
-This space intentionally left blank.
Beauregard T. Shagnasty wrote: David Dorward wrote: ... which is nonsensical.
I agree. <g> Have you a better solution?
Don't use a caption and have sane (null) alt text. You still get an ugly
effect in graphical browsers without CSS, but its better then nothing. (The
other option is to forget about trying to achieve that effect and live with
the top of the image being parallel to the beginning of the paragraph).
--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
On Sat, 18 Dec 2004, Beauregard T. Shagnasty wrote: David Dorward wrote:
... which is nonsensical.
I agree. <g> Have you a better solution?
Provide any additional detail about the image by means of the
attribute that's meant for it, namely title= (just how the reader gets
their hands on that is a client-specific issue: I won't say it's by
any means ideal, but at least, as a document author, you'd be doing
the right thing).
Use the alt(ernative text) for providing a genuine textual alternative
for the image's purpose, whatever it might be. In this case, that
genuine alternative might be alt="".
But if you need the image to be an anchor link, then maybe you could
adapt this principle (from my now somewhat outdated example): http://ppewww.ph.gla.ac.uk/~flavell/alt/floater.html
David Dorward wrote: Beauregard T. Shagnasty wrote:
David Dorward wrote:
... which is nonsensical.
I agree. <g> Have you a better solution?
Don't use a caption and have sane (null) alt text. You still get an ugly effect in graphical browsers without CSS, but its better then nothing. (The other option is to forget about trying to achieve that effect and live with the top of the image being parallel to the beginning of the paragraph).
I'll consider the null alt text. My client, however, would not like me
to remove the captions, so there would still be a nonsensical
paragraph in a text browser. I'll ask him, though.
--
-bts
-This space intentionally left blank.
Beauregard T. Shagnasty wrote: I'll consider the null alt text. My client, however, would not like me to remove the captions, so there would still be a nonsensical paragraph in a text browser.
Or a graphical browser with a screen reader ...
.... or a search engine indexing robot.
--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
David Dorward wrote: Beauregard T. Shagnasty wrote:
I'll consider the null alt text. My client, however, would not like me to remove the captions, so there would still be a nonsensical paragraph in a text browser.
Or a graphical browser with a screen reader ... ... or a search engine indexing robot.
Perhaps I could surround the caption with something like this:
<span style="cap">[Caption: </span>A house with ice dam<span
style="cap"> ]</span>
..cap { display: none }
--
-bts
-This space intentionally left blank. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 did try
<div style="width:120px; float:left;">
<img src="schloss.jpg" width="88" height="100">
what did work for :left and for :right margin with floating text around.
|
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 image is still in it's original
position and doesn't start wrapping until it's 10px below the bottom of the
image. How can I work around this?
TIA,
Aaron
|
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 style="clear:left;">This is some text</span>
In Mozilla 1.6 the span still floats around the image on the left side
(as if there wasn't a "clear" option). When I use
|
by: mike |
last post by:
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...
|
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.
(use a fixed-width font to view this!)
Some short text. +-------+
| |
+-------+
| |
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 one problem surrounding this issue.
I am trying to make a <div> block that contains
a) a link
b) an arrow or an image of an arrow
c) another link
d) another link floated off to the far right
All of this must be on one horizontal line.
The...
|
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 image (say 100 pixels high) that is set to float left, the text that I'm floating around it is only 2 lines high (leaving room for additional text below). Because there is room for additional text floating right of the image my next paragraph text...
|
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 here: http://www.cbcgroup.com.au/drupal.
No issues in ie7 or Firefox - can someone tell me what I'm doing
wrong?
Thanks.
|
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 =\
|
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...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |