Note that there are some explanatory texts on larger screens.

plurals
  1. POImage not responding to browser size
    primarykey
    data
    text
    <p>I am trying to make an image respond to the browser size, so that when the browser is smaller, the image responds so that there is no scrolling involved. I found a similar question here <a href="https://stackoverflow.com/questions/4684304/how-can-i-resize-an-image-dynamically-with-css-as-the-browser-width-height-chang">How can I resize an image dynamically with CSS as the browser width/height changes?</a>, but I'm not able to make that solution work. What am I missing?</p> <p>I'm including my code below - I am using Wordpress, so it puts a "p" tag around my image automatically, wrapping my image in a paragraph. Also, I'm not sure if I'm including too much code for this purpose, but I wanted to make sure it was all there in case there's an error in a strange place that could be causing the problem...</p> <p>Here is my html:</p> <pre><code>&lt;body&gt; &lt;div id="pop_up_page"&gt; &lt;div class="content_well_pop"&gt; &lt;div class="content_pop"&gt; &lt;div class="portfolio_workspace_9"&gt; &lt;h2&gt;Here's the Header&lt;/h2&gt; &lt;/div&gt; &lt;div class="portfolio_workspace_8"&gt; &lt;p&gt; &lt;img src="heres_the_image"/&gt; &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; </code></pre> <p>Here's my CSS:</p> <pre><code>body { background-attachment: fixed; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding: 0; height: 100%; } #pop_up_page { background-attachment: fixed; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding: 0; height: 100%; .content_well_pop { left: 0; width: 100%; } .portfolio_workspace_9 { width: 1000px; margin: 15px 0 0 0px; position: relative; float: left; display:block;} .portfolio_workspace_8 { width: 1000px; margin: 0px 0 50px 0px; position: relative; float: left; height: auto; display:block;} p{font-family: "Franklin Gothic Book"; font-size: 15px; color: #757372; display: block; } .portfolio_workspace_8 img { margin-left: auto; margin-right: auto; display: block; max-width: 100%; height: auto; } </code></pre> <p>Thanks</p>
    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.
 

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