« Web, HTML, Tech Forum

How do I put images next to text?

Whenever I put an image on a blog or just in my "About me", the image is only above or below the text, and I wish there was a way to place the images in the sides of the texts. Does anyone know how?


Report Topic

1 Reply

Reply by BOYCANNIBAL 🄩

posted
updated

Hey i think i might be able to help you out!!


if u want more columns js copy and paste the div class=ā€columnā€ and change the width of it to the amount of percent (it has to add up to 100% or roughly 100%Ā  so 50% + 50% = 100%, 33% + 33% +33% ~= 100%) & if u want them 2 stay close together u can add in the style margin: 0;


also if u want to do it so that the text takes up more space delete the .column {} from the style and replace the <div class="column"> to <div class="column" style="float: left; width #%"> still make sure it add up to or roughly adds to 100% c:


<div class="row">

<div class="column">

<!--image or text here!-->

</div>

<div class="column">

<!--image or text here!-->

</div>

</div>


<style>

.row:after {

display: table;

clear: both;

content: "";

}

.column {

float: left;Ā 

width: 50%; /* adjust size here!! */

}

</style>


here is a good link 2 learn abt 2 row columns if u need it!! (it also tells u abt the code above) <3


https://www.w3schools.com/howto/howto_css_two_columns.asp


Permalink Report Reply