Click here to Skip to main content
15,887,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Every time the browser is resized smaller then the full resolution the image overlaps the text and i'm not sure what to do. The problem is with the ul class photo section

What I have tried:

HTML
      <h1>
        An Exciting Blog Post
      </h1>
      <div class="box">
      
      </div>
      <p>Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon
        azuki bean garlic.</p>

      <p>Gumbo beet greens corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea sprouts fava bean collard greens
        dandelion okra wakame tomato. Dandelion cucumber earthnut pea peanut soko zucchini.</p>

      <p>Turnip greens yarrow ricebean rutabaga endive cauliflower sea lettuce kohlrabi amaranth water spinach avocado daikon
        napa cabbage asparagus winter purslane kale. Celery potato scallion desert raisin horseradish spinach carrot soko.
        Lotus root water spinach fennel kombu maize bamboo shoot green bean swiss chard seakale pumpkin onion chickpea gram
        corn pea. Brussels sprout coriander water chestnut gourd swiss chard wakame kohlrabi beetroot carrot watercress.
        Corn amaranth salsify bunya nuts nori azuki bean chickweed potato bell pepper artichoke.</p>

      <p>Nori grape silver beet broccoli kombu beet greens fava bean potato quandong celery. Bunya nuts black-eyed pea prairie
        turnip leek lentil turnip greens parsnip. Sea lettuce lettuce water chestnut eggplant winter purslane fennel azuki
        bean earthnut pea sierra leone bologi leek soko chicory celtuce parsley jícama salsify.</p>

      <p>Celery quandong swiss chard chicory earthnut pea potato. Salsify taro catsear garlic gram celery bitterleaf wattle
        seed collard greens nori. Grape wattle seed kombu beetroot horseradish carrot squash brussels sprout chard.</p>

    

 <pre>    <aside>
      <h2>
        Photography
      </h2>
      <ul class="photos">
        <li>
          <img src="balloon-sq1.jpg" alt="placeholder" width="100px">
        </li>
        <li>
          <img src="balloon-sq2.jpg" alt="placeholder" width="100px">
        </li> 
        <li>
          <img src="balloon-sq3.jpg" alt="placeholder" width="100px">
        </li>
        <li>
          <img src="balloon-sq4.jpg" alt="placeholder" width="100px">
        </li>
        <li>
          <img src="balloon-sq5.jpg" alt="placeholder" width="100px">
        </li>
      </ul>

    </aside>
  </main>



</body></html>









HTML
>
body  {
    background-color: #fff;
    color: #333;
    margin: 0;
    font: 1.2em / 1.2 Arial, Helvetica, sans-serif;

  }

  img {
      max-width: 100%;
      display: block;
  }
  
  .logo {
    font-size: 200%;
    padding: 50px 20px;
    margin: 0 auto;
    max-width: 980px;
  }
  
  .flex {
    flex-wrap: wrap;
    margin: 0 auto;
    padding: 0 20px;
    max-width: 980px;
  }
  
  nav {
    background-color: #000;
    padding: .5em;
  }
  
  nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  nav a {
    color: #fff;
    text-decoration: none;
    padding: .5em 1em;
  }
  
  .photos {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    grid-gap: 1px;
    min-width: 180px

  }

  .feature {
      width: 200px;
  }


aside{
  position: absolute;
  top: 290px;
  right: 240px;

}

.box {
    float: left;
    width: 190px;
    height: 190px;
    margin-right: 15px;
}
Posted
Updated 21-Jul-19 7:09am
v3
Comments
Anurag Gandhi 21-Jul-19 9:23am    
Any plunkr/codepen/jsFiddle link would be helpful to reproduce the issue, if you can do that.

1 solution

I see that the problem is due to the css class applied to aside.

CSS
aside{
  position: absolute;
  top: 290px;
  right: 240px;
}


This is causing your text to overlap in lower resolution. Please apply appropriate css over here and remove position absolute. It should work after that.

Suggestion: Change to css of aside to:
CSS
aside{
  float: right;
  max-width: 100%;
  width: 500px;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900