469,950 Members | 2,309 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

Input and Div side by side

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

Similar topics

5 posts views Thread by The Plankmeister | last post: by
1 post views Thread by qpon | last post: by
30 posts views Thread by Richard | last post: by
6 posts views Thread by Dan | last post: by
3 posts views Thread by jackiepatti | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.