Home > Software design >  Using col with text and an image is not working
Using col with text and an image is not working

Time:08-03

Hi i'm trying to get this kendrick image to the right of the text and i used the col-8 and col-4 classes before each but the image just remains below the text. Can someone tell me where i've gone wrong? thanks :)

css code

html code

CodePudding user response:

Try changing the Html div like this

<div >
   <img src="kabout.jpg">
</div>

i.e remove the inner div and add the col-4 class name to the parent div insetead.

CodePudding user response:

Try using "display: inline-block" in the CSS of both the divs that are col-8 and col-4.

Try using "display: inline" in the CSS of both the divs that are col-8 and col-4.

Also if it doesn't work then try removing text-align: center from the CSS and again try the display tags mentioned above.

I hope any of this will work.

  • Related