Sherif Mohamed Sherif Mohamed - 1 month ago 12
HTML Question

How can i <br> two image next to one image?

I'm putting captcha in my website and this is its pictures

current layout

I need to change the place of refresh icon to become like this

desired layout

but when I put

<br>
between the voice and refresh icon I'm finding it is becoming like this:

erroneous layout

I'm also finding this:

erroneous layout

Here is my code:

<p>
<img id="siimage" style="border: 1px solid #000; margin-right: 15px" src="./securimage_show.php?sid=<?php echo md5(uniqid()) ?>" alt="CAPTCHA Image" align="left">
<input type="text" value="إكتب هنا"onfocus="(this.value == 'إكتب هنا') && (this.value = '')"onblur="(this.value == '') && (this.value = 'إكتب هنا')" name="ct_captcha" size="3" style="color: #00FFFF; border:1px solid #FFff00; height:80px; background color:#001003; background:#001003; font-family:Arial; font-size:50px; padding:1px" maxlength="6" />
<object type="application/x-shockwave-flash" data="./securimage_play.swf?bgcol=#ffffff&amp;icon_file=./images/audio_icon.png&amp;audio_file=./securimage_play.php" height="32" width="32">
<param name="movie" value="./securimage_play.swf?bgcol=#ffffff&amp;icon_file=./images/audio_icon.png&amp;audio_file=./securimage_play.php" />
</object>
&nbsp;
<a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false"><img src="./images/refresh.png" alt="Reload Image" onclick="this.blur()" align="bottom" border="0"></a>
<br />
</p>

Answer

@Sherif Mohamed, try the code below. I just made some changes in css if you needed ;)

<div style="width:100%;">
  <div  style="width: 25%; float: left;">
    <img id="siimage" src="./securimage_show.php?sid=<?php echo md5(uniqid()) ?>" alt="CAPTCHA Image" align="left">
    <input type="text" value="إكتب هنا"onfocus="(this.value == 'إكتب هنا') && (this.value = '')"onblur="(this.value == '') && (this.value = 'إكتب هنا')" name="ct_captcha" size="3" style="color: #00FFFF; border:1px solid #FFff00; height:80px; background color:#001003; background:#001003; font-family:Arial; font-size:50px; padding:1px" maxlength="6" />
 </div>
 <div  style="width:60%;">
   <object type="application/x-shockwave-flash" data="./securimage_play.swf?bgcol=#ffffff&amp;icon_file=./images/audio_icon.png&amp;audio_file=./securimage_play.php" height="32" width="32">
     <param name="movie" value="./securimage_play.swf?bgcol=#ffffff&amp;icon_file=./images/audio_icon.png&amp;audio_file=./securimage_play.php" />
   </object><br/>
   <a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false"><img src="./images/refresh.png" alt="Reload Image" onclick="this.blur()" align="bottom" border="0"></a><br />
   </div>
</div>
Comments