It might be my own mistake or carelessness during following a Video tutorial in purpose of learning in youtube where when in the part on the home page content, I want the content of a picture and text to be inline like the tutorial but mine were like this
So I decided to learn about display: flex
where we put in the parents Division to flex the two content division inside it
How I want it to look like
HTML:
CSS:
2
Answers
if you wanna use flex dispaly you must wrap all of your code in flex with an row direction -> flex-direction: row; , then in right div place your image , in left div set flex-direction: column and write other code like your text or etc… , and set flex :1 to those to get same width
small exmaple:
You should set .main-slide as display:flex and flex direction: row and wrap the content except the image in a div with a class .left-div for example which will be display:block. If the screen width is small they may not align in a row anymore.