No announcement yet.

Quick question about image placement!!!

  • Filter
  • Time
  • Show
Clear All
new posts

  • Quick question about image placement!!!

    I'm currently working on a website for my comp sci class since we're working on web development right now. Below I've attached a link to an image which will be helpful to know what I'm talking about. I created a div that has a width of 1000px so the text doesn't go flying into the right side so its easier to read (black box). What I want to do is have an image that relates to that chunk of text to the right of it (similar to Wikipedia). I was able to have it go to the right of the div with "float: right;" but I would like it to be to the direct right of the text because it is still under the 1000px limitation so it doesn't go to the right of the page, just as far right as the width property allows. The only reason I want the image and the text div to be connected is that I would like to vertically align the image with the text so it is vertically center for that block of text instead of the entire website. Any help is appreciated and I'm super bad at explanations so if there's anything I wasn't clear about, please let me know.
    Last edited by willy99; 26-09-2019, 01:12.