I need any help!


Joined
Nov 14, 2021
Messages
1
Reaction score
0
I am currently 2 weeks old in coding and there's a need for me to make a simple website with hover effects until tommorow. I cannot figure out how to align texts with an image (vertically) and I don't know how to set the width and height of the website itself even with provided measurements/instructions. I think the width of the website needs to be 1280px but should I make the height auto? I am so lost and tried different videos with no luck. Any help at this point will greatly be appreciated!!
 
Ad

Advertisements

Joined
Nov 13, 2020
Messages
94
Reaction score
17
You should write what you have in the post so we know what we're dealing with.
Don't set the height of a website. Content will do that.

The best method to align things vertically. and horizontally.
Code:
  display: flex;
  align-items: center;
  justify-content: center
}
Make two divs -> one for the image and the other for the text. Put both into a div with the above css.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top