Search code examples
htmltagsframe

how to add text below two div tags


I have two div tags - current page appears like

-------------
<tag-1>   <tag-2>
---------------

now I want to add some static text below these two div tags how to do that? result page should look like -

--------------
<tag-1>  <tag-2>
some text with scroll bar
some text again
----------

current html

<body>
    <div id="tag1"></div>
    <div id="tag2"></div>

</body>

Solution

  • Assuming both divs have a float: left; css tag to allow them to be side by side, you'd add another div with clear: both; css tag to make sure this contianer is below the float elements.

    <body>    
    <div style="float: left;" id="tag1">tag 1</div>    
    <div style="float: left;" id="tag2">tag 2</div>
    <div style="clear: both;">
    My Text
    </div>
    </body>