By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,738 Members | 1,080 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,738 IT Pros & Developers. It's quick & easy.

Input and Div side by side

P: n/a
Hello,

I am trying to place and input and a div side by side.
Inside the div is an image which is the same height of the input image.
However, when I make the image inside the div visible the content after
it goes a little bit down, like the image inside the div would be
higher than the input image.

Could someone, please, help me out with this?

The HTML code is as follows:

<input name="myInput" id="myInput" class="myInput" src="myInput.jpg"
style="border-width: 0px;" type="image">
<div role="" id="myInput" style="display: block;">
<img title="My Image ..." src="MyImage.gif" alt="My Image ..."
style="border-width: 0px;">
</div>

And the CSS code is:
..myInput {float: left}

Thanks,
Miguel

Jan 19 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
shapper wrote:
>
I am trying to place and input and a div side by side.
Inside the div is an image which is the same height of the input image.
However, when I make the image inside the div visible the content after
it goes a little bit down, like the image inside the div would be
higher than the input image.

Could someone, please, help me out with this?

<input name="myInput" id="myInput" class="myInput" src="myInput.jpg"
style="border-width: 0px;" type="image">
<div role="" id="myInput" style="display: block;">
<img title="My Image ..." src="MyImage.gif" alt="My Image ..."
style="border-width: 0px;">
</div>
Without an URL showing a test case it is hard to tell what you are
really hoping to accomplish.
Why use the <divat all? It contains only an image. Apply the style to
the image instead.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jan 19 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.