PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, May 6, 2022

[FIXED] How do I place paragraph to the right of a block of images?

 May 06, 2022     css, display, image, position, text     No comments   

Issue

I'm trying to place a small paragraph next to 4 images that are on top of each other.

At the moment the paragraph is below the images.

This is what I want to achieve:

https://ntchwaidumela-thomas.pixpa.com/architecture/container-society

I tried float but the text just moved to the right but stayed at the bottom.

  .column img {
  display: block;
  padding: 20px;
  width: 55%;
  height: auto;
}

.column {
  margin-left: 70px;
  display: inline-block;
  margin-bottom: 40px;
}

.para {
  display: inline-block;
  width: 55%;
  font-size: 18px;
  line-height: 30px;
  letter-spacing: 1px;
  text-align: center;
  color: rgba(47, 46, 46, 0.70);
<div class="row">
  <div class="column">
    <img id="img1" src="architecture/img1.jpg">
    <img id="img2" src="architecture/img2.jpg">
    <img id="img3" src="architecture/img3.jpg">
    <img id="img4" src="architecture/img4.jpg">
  </div>
  <div class="para">
    <p class="para"> text text text text text text text text text text text text tetx
      <br><br> text text text text text text text text text text text text tetx<br><br> text text text text text text text text text text text text tetx</p>
  </div>


Solution

make the row class display:flex and height:100vh

.row{
  display:flex;
  height:100vh;
}
.column img {
  display: block;
  padding: 20px;
  width: 80%;
  height: auto;
}

.column {
  height:100vh;
  overflow-y: scroll;
  margin-left: 70px;
  display: inline-block;
  margin-bottom: 40px;
  width: 60%;
}

.para {
  display: inline-block;
  width: 55%;
  font-size: 18px;
  color: rgba(47, 46, 46, 0.70); 
  letter-spacing: 3px;
  line-height: 60px;
  text-align: center;
  
}
<div class="row">
  <div class="column">
    <img id="img1" src="https://picsum.photos/200">
    <img id="img2" src="https://picsum.photos/200">
    <img id="img3" src="https://picsum.photos/200">
    <img id="img4" src="https://picsum.photos/200">
  </div>
  <div class="para">
    <p class="para"> text text text text text text text text text text text text tetx
      <br><br> text text text text text text text text text text text text tetx<br><br> text text text text text text text text text text text text  text text text text text text text text text text text text tetx<br><br> text text text text text text text text text text text text   text text text text text text text text text text text text tetx</p>
  </div>



Answered By - Dhaifallah
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing