How to set a div within text?

Tags: html,css

Problem :

Is it possible to declare CSS for a div, so that the declared div will be shown inside a line of text? E.g. a span can be shown inside text, but how about div? See below or here for an example.
Thanks in advance

This is a * * * Text-Test! * * * 
This is a * * * Text-Test! * <span style="position:absolute; width:200px; color:#FF0000; float:left;"><b>This Span is inside the text or line.</b></span>* * This is a * * * Text-Test! * * *<br/>
This is a * * * Text-Test! * * * This is a * * * Text-Test! * * *<br/>
This is a * * * Text-Test! * <div id="Helper" style="position:absolute; background-color:#00FF00; width:100px; height:20px; float:right;">*** This DIV is at the beginning of the text or line. *** </div>* * This is a * * * Text-Test! * * * <br/>
This is a * * * Text-Test! * * * This is a * * * Text-Test! * * *

Solution :

You need to use display:inline in css. Here is the link to the fiddle

Try like this: Hello <div style="display:inline;">World!</div> How are you?

    CSS Howto..

    multiselect.js via gem multi-select-rails - how best to set width

    How to align DIV right or left or center in CSS without absolute positioning?

    how to prevent transformation of text inherited from a skewed parent

    How to style last tag img css?

    How to work with CSS efficiently?

    How to keep nav bar from shifting elements to next line when zooming in?

    How to wrap Font-Awesome with CSS?

    How to contain a div floating outside of container div

    How to fix angular-strap css

    How to use a Drive hosted css to customize the receiver?

    How to get global selector inside emulated view encapsulation (CSS / Angular2)

    how to CSS select all th cells, except the last one on IE7/8?

    PrimeFaces: how can I make use of customized icons?

    how to create a vertical menu in html/css [closed]

    how to configure .htc files to work on nginx

    How do I place a small paragraph to the right in between a text article

    How to set css @media print styling with jquery

    How to create a tag using css

    How to add background image to only one page in Jade

    How to set different css attributes with JQuery?

    How to make changes in wordpress template. Css direct edit not working

    how to make div with one line of text and div with two the same height?

    How to apply css on every 2nd child using nth-child() with jquery

    How to make a horizontal 2-colored strip in a tablecell?

    How to vary the tone of an image dynamically using only css?

    How do I load / unload css changes quickly on a plone + Zope site ? (noob)

    How to customize Subscribe2 button appearance in WordPress?

    How to include by default icon inside a textarea

    Internet Explorer 10 menu item shows focus outline unexpectedly

    How to force Jade not to indent block tag?