Wrap Text Around Image In HTML Only - Stack Overflow

Sorry, we no longer support your browser Please upgrade to Microsoft Edge, Google Chrome, or Firefox. Learn more about our browser support. Just browsing Stack Overflow? Help us improve your experience. Sign up for research
    1. Home
    2. Questions
    3. Tags
    4. Users
    5. Companies
    6. Labs
    7. Jobs
    8. Discussions
    9. Collectives
    10. Communities for your favorite technologies. Explore all Collectives

  1. Teams

    Ask questions, find answers and collaborate at work with Stack Overflow for Teams.

    Try Teams for free Explore Teams
  2. Teams
  3. Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Get early access and see previews of new features.

Learn more about Labs Wrap text around image in HTML only Ask Question Asked 5 years ago Modified 5 years ago Viewed 3k times -2

I am having trouble aligning text in HTML. There is a website that I am using and in one of the editable areas I have the ability to enter in a HTML snippet. We would like to have the text aligned in the middle, right hand side of the image. I can get the first line of text to align middle but the second line drops off under the image. Is there anyway to continue the text directly under the first line of text, while keeping it centered vertically. Unfortunately since this is a small HTML snippet I cannot add Div or CSS.

We would want it to look something like this.

We would want it to look something like the image attached above.

Thank you.

<img style="padding: 0px 5px 0px 0px;" float: left;" align="middle"src="http://upload.wikimedia.org/wikipedia/commons/8/8d/Stop_hand_nuvola_alternate_text.svg"/><font color="#ff0000" style="font-family: Arial, Helvetica, sans-serif;"><font size="4"> Some Text here Some Text here Some Text here Some Text here Some Text here Some Text here <a href="https://blank.com/blank" target="_self">(a link)</a><a> Some more text here <a href="mailto:[email protected]">here is an email link</a> some more text.</p> </font>

Share Improve this question Follow edited Nov 5, 2019 at 16:54 itstudent101 asked Nov 5, 2019 at 16:21 itstudent101's user avatar itstudent101itstudent101 431 silver badge7 bronze badges 5
  • 2 Fix your typos please – j08691 Commented Nov 5, 2019 at 16:27
  • I fixed it sorry – itstudent101 Commented Nov 5, 2019 at 16:38
  • 2 No, you fixed one and introduced another. It should be style="padding: 0px 5px 0px 0px; float: left;" which works by the way. Also note though that the <font> element no longer exists – j08691 Commented Nov 5, 2019 at 16:45
  • 1 Also, note that the align attribute is deprecated and should not be used and that middle has never been a valid value for align (although it was for valign before that was deprecated). – Quentin Commented Nov 5, 2019 at 16:46
  • I am sorry, I do not know enough about code to know what the typos are. That is why I am asking questions. – itstudent101 Commented Nov 5, 2019 at 16:56
Add a comment |

1 Answer 1

Sorted by: Reset to default Highest score (default) Trending (recent votes count more) Date modified (newest first) Date created (oldest first) 1

The problem is in your inline CSS code in the image:

You have: <img style="padding:style="padding: 0px 5px 0px 0px;" "float: left;" Should be: <img style="padding:style="padding: 0px 5px 0px 0px;float: left;"

I removed: " "

<img style="padding: 0px 5px 0px 0px;float: left;" align="middle"src="http://upload.wikimedia.org/wikipedia/commons/8/8d/Stop_hand_nuvola_alternate_text.svg"/> <font color="#ff0000" style="font-family: Arial, Helvetica, sans-serif;"><font size="4"> Some Text here Some Text here Some Text here Some Text here Some Text here Some Text here <a href="https://blank.com/blank" target="_self">(a link)</a><a> Some more text here <a href="mailto:[email protected]">here is an email link</a> some more text.</p> </font>

Share Improve this answer Follow answered Nov 5, 2019 at 16:47 Dennis van de Hoef - Xiotin's user avatar Dennis van de Hoef - XiotinDennis van de Hoef - Xiotin 1,5591 gold badge14 silver badges30 bronze badges 2
  • This has already been noted in the comments above. You should, provided you have enough rep, vote to close the question as off-topic due to a typo. – j08691 Commented Nov 5, 2019 at 16:52
  • Hmm, I see that it was added as a comment while I was writing this answer. (I got distracted while typing). As for the voting, downvotes are counted but not displayed with my reputation, so it is hard to know the precise effect. Also, I am not allowed to comment since my reputation is below 50. But that is really offtopic here ;) – Dennis van de Hoef - Xiotin Commented Nov 5, 2019 at 17:01
Add a comment |

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid …

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

Draft saved Draft discarded

Sign up or log in

Sign up using Google Sign up using Email and Password Submit

Post as a guest

Name Email

Required, but never shown

Post Your Answer Discard

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.

  • Featured on Meta
  • We’re (finally!) going to the cloud!
  • More network sites to see advertising test [updated with phase 2]
1 How to wrap specific text around an image? 3 Text Wrap around an image 153 How to wrap text around an image using HTML/CSS 0 How to wrap text around image? 0 How to wrap text around image in div? 0 Text wrap around image, to one column 0 wrap text around an image in html and css 1 HTML wrap text around image in div 2 Have text wrap image 2 How to wrap text around image with CSS?

Hot Network Questions

  • Full Bridge Rectifier - Output Voltage Saturation
  • will "brown aluminum" drip-edge suffer galvanic corrosion if it rests against fascia made of copper-treated lumber?
  • What are the strongest arguments against Epistemic Permissivism?
  • Can I use the Wish Spell to change my Class ( Wizard 18, Warlock 2 to Wizard 19, Warlock 1)?
  • Using Reverse Tunnel for accessing URL not directly accessible
  • Why is this soldering iron red hot in the middle section?
  • Is there definitive confirmation that the Pope sacked Cardinal Tremblay in "Conclave"?
  • What does "inside" refer to when we say that the electric field inside a conductor is 0?
  • Non-reflexive use of laisser without a direct object in « The Stranger » ?
  • Formative alternative to midterms for a large class
  • Does ambigous license without a version refer to most recent? Is 'AGPL' currently equivalent to 'AGPL-3.0-only'?
  • How do I remove a hat from my horse?
  • What is the name of the lady with the white blouse?
  • Line breaks do not fit well in mathmode
  • Prospective employers tell me my field is obsolete. How can I reinvent myself?
  • What geographical changes does Canada need to have a far larger carrying capacity?
  • What happened to the lifeboats in Star Trek: First Contact?
  • Jacobi Elliptic Functions
  • Reality check: energy source for power armour
  • Can this strong directional blur at wide apertures still be explained by the usual arguments?
  • How to identify unsafe trees for climbing stand?
  • Is there a commonly used expression for adjusting a training or form of support to a person's specific situation and needs?
  • Person of interest/under investigation living abroad - what can the UK police do?
  • Convergence of random functions
more hot questions Question feed Subscribe to RSS Question feed

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

lang-html

Từ khóa » Html Wrap Text Around Image With Padding