html - How to align a div to the right of an iframe? -


in jsp have iframe , div. div has 4 buttons.

<iframe id="iframe_role" src="" width="75%" height="75%" scrolling="auto" frameborder="1"> </iframe>  <br><br>  <div id="div_buttons">      <button type="submit" id="button_add">add role</button>      <button type="submit" id="button_edit">edit role</button>        <button type="submit" id="button_delete">delete role</button>        <button type="submit" id="button_refresh">refresh</button>  </div> 

i want align div right of iframe right side of iframe aligned right side of refresh button.

i tried using align attribute of div:

<div id="div_buttons" align="right"> 

but aligned div right of browser window.

how can align div right of iframe?

you can make div wide iframe, (in case 75%), , set text-align property right:

tip: you should no longer use inline attributes set layout properties such height or width... should managed css:

#iframe_role {    width: 75%;    height: 75%;    overflow: auto;  }    #div_buttons {    width: 75%;    text-align: right;  }
<iframe id="iframe_role" src="" frameborder="1">  </iframe>    <br><br>    <div id="div_buttons">      <button type="submit" id="button_add">add role</button>      <button type="submit" id="button_edit">edit role</button>        <button type="submit" id="button_delete">delete role</button>        <button type="submit" id="button_refresh">refresh</button>   </div>


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -