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..

    Block grid shows horizontal scroll bar in Foundation

    CSS-how to text-indent a nested unordered list

    How to add color to text in my div with code

    How to make emails responsive?

    How to find Sharepoint 2013 CSS Classes?

    How do I add another css to Bootstrap?

    How to indicate that an LI with a link was pressed.

    How to get an App made using JavaScript to autoresize for other Apple Devices?

    How do I spilt the footer into different widths?

    How to hide a soft hyphen (­) in HTML / CSS

    How to center bootstrap navba-nav on scroll when fixed?

    How to disable the letter tail from the last letter of a word in CSS?

    How to delete space in css?

    how to prevent css animation from running on page load

    how to position two image as a background image on div by css

    How I can add highlight effect on outside the area of selection with CSS?

    How to disable mask on selected image in the f/ckeditor in webkit, opera browsers?

    How to get the CSS attributes from a control located by XPath using Selenium IDE

    How to rotate a line(x1=50,y1=50,x2=50,y2=10) with respect to x=50,y=50 as center using CSS?

    How to overlap a border in CSS in order to create tabs?

    CSS Column Help: How do I get a column within a column?

    How to uniformly darken colors?

    how to use CSS positioning in 100% width layout

    How does google elegantizr work?

    How to properly center steps in bootstrap?

    How to disable scrollbars in Webmethods 8?

    inside :before element

    How to put a div in more pages

    How do I get my tabs to line up properly using CSS?

    How to override default CSS in cakePHP 1.3?