I want to output a single line of text to the browser that contains a tag. When this is rendered it appears that the DIV causes a new line. How can I include the content in
Use css property - white-space: nowrap;
<div style="float: left;">
<?php
echo("<a href=\"pagea.php?id=$id\">Page A</a>")
?>
</div>
<div id="contentInfo_new" style="float: left;">
<script type="text/javascript" src="getData.php?id=<?php echo($id); ?>"></script>
</div>
use float:left on the div and the link, or use a span.
You can simply use:
#contentInfo_new br {display:none;}
div
is a block element, which always takes up its own line.
use the span
tag instead
Add style="display: inline"
to your div.