Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to prevent div wrapping in php html
    primarykey
    data
    text
    <p>I am having trouble with the webpage in php that I'm trying to make. The 2 divs inside the main div kept getting wrapped. I am trying to arrange it in a way that the rifleman blue is on the left and the rifleman red is on the right of the page since the user will be comparing both riflemen's stats. I am not good with CSS but will push myself if it's the only solution since my neck already hurts so bad and still couldn't find a way to do this. My target browsers are just FF and Chrome. I need a way to make 2 displayed in one line on the page and not make the 2nd div below the 1st div.</p> <pre><code>&lt;?php $profpic = "darkbg.jpg"; ?&gt; &lt;html&gt; &lt;style type="text/css"&gt; body { background-image: url('&lt;?php echo $profpic;?&gt;'); } &lt;/style&gt; &lt;body&gt; &lt;img src="headergiflong.gif" style="width:100%;height:30%;"&gt;&lt;br&gt; &lt;div&gt; &lt;div style="display:inline;width:200;height:300;background-color:blue;"&gt; &lt;select id="comparea"&gt; &lt;option value="rifleman.php"&gt;Rifleman&lt;/option&gt; &lt;option value="mortarman.php"&gt;Mortarman&lt;/option&gt; &lt;option value="machinegunner.php"&gt;Machine Gunner&lt;/option&gt; &lt;option value="javelin.php"&gt;Javelin&lt;/option&gt; &lt;/select&gt; &lt;br&gt; &lt;iframe id="compare1" style="background-color:black; color:white; border:0;" src="rifleman.php" width="45%" height="300"&gt;&lt;/iframe&gt; &lt;/div&gt; &lt;br&gt; &lt;div style="display:inline;width:200;height:300;background-color:red;"&gt; &lt;select id="compareb"&gt; &lt;option value="rifleman.php"&gt;Rifleman&lt;/option&gt; &lt;option value="mortarman.php"&gt;Mortarman&lt;/option&gt; &lt;option value="machinegunner.php"&gt;Machine Gunner&lt;/option&gt; &lt;option value="javelin.php"&gt;Javelin&lt;/option&gt; &lt;/select&gt; &lt;br&gt; &lt;iframe id="compare2" style="background-color:black; color:white; border:0;" src="rifleman.php" width="45%" height="300"&gt;&lt;/iframe&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload