using <div> tag

D

Dave

When I using the following HTML code....

&nbsp;<INPUT type="text" id=text1 >
&nbsp;
<span id="id1"> this is a textbox </span>
&nbsp;
<div id="id2">div tag</div>

....the output is displayed as three lines like...

<Textbox>
this is a textbox
div tag


I would like to have all 3 display on single line,

How can I get them to display on a single line and still keep my DIV tags?
 
C

Charles

Add between <head> </head>

<script type="text/javascript">
function new_window(url) {

link =
window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=650,height=500,left=50,top=20");
link.focus()
}
</script>



Then with Frontpage highlight the text and and rightclick - Hyperlink...

javascript:new_window('http://www.websiteaddress.com/')

Please note the parameters are controlable.

I hope this works and explained it properly-
Charles
 
R

Ronx

Try
<div style="float:left;width:300px>
&nbsp;<INPUT type="text" id=text1 >&nbsp;
<span id="id1"> this is a textbox </span>&nbsp;
<div>
<div id="id2" style="margin-left:300px">div tag</div>
<br style="clear:both">

The actual layout you see will depend on what styles you have set for id2
and id1 - which could cause
the elements to display on separate lines anyway.
 
K

Kevin Spencer

A div is a block element. A span is an inline element. Do you have a reason
for wanting to use a div as an inline element? If you do, you can use a
style to do it: <div style="display:inline;">

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
There's a seeker born every minute.
- Dr. "Happy" Harry Cox
 
M

Murray

Ronx:

Should be -

<div style="float:left;width:300px>
&nbsp;<INPUT type="text" id=text1 >&nbsp;
<span id="id1"> this is a textbox </span>&nbsp;
</div><!-- Note this is a closing div -->
<div id="id2" style="margin-left:300px">div tag</div>
<br style="clear:both">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top