Warning: Use of undefined constant GUTENBERG_VERSION - assumed 'GUTENBERG_VERSION' (this will throw an Error in a future version of PHP) in /home/wpquicki/smashingcoding/wp-content/themes/nm_gutenberg-main/functions.php on line 43

Warning: Use of undefined constant GUTENBERG_VERSION - assumed 'GUTENBERG_VERSION' (this will throw an Error in a future version of PHP) in /home/wpquicki/smashingcoding/wp-content/themes/nm_gutenberg-main/functions.php on line 49
Markup: Image Alignment – SmashingCoding Lab

Markup: Image Alignment


Welcome to image alignment! The best way to demonstrate the ebb and flow of the various image positioning options is to nestle them snuggly among an ocean of words. Grab a paddle and let’s get started.

On the topic of alignment, it should be noted that users can choose from the options of None, Left, Right, and Center. In addition, they also get the options of Thumbnail, Medium, Large & Fullsize. Be sure to try this page in RTL mode and it should look the same as LTR.

Image Alignment 580x300

The image above happens to be centered.

Image Alignment 150x150 The rest of this paragraph is filler for the sake of seeing the text wrap around the 150×150 image, which is left aligned.

As you can see the should be some space above, below, and to the right of the image. The text should not be creeping on the image. Creeping is just not right. Images need breathing room too. Let them speak like you words. Let them do their jobs without any hassle from the text. In about one more sentence here, we’ll see that the text moves from the right of the image down below the image in seamless transition. Again, letting the do it’s thang. Mission accomplished!

And now for a massively large image. It also has no alignment.

Image Alignment 1200x400

The image above, though 1200px wide, should not overflow the content area. It should remain contained with no visible disruption to the flow of content.

Image Alignment 1200x400

And we try the large image again, with the center alignment since that sometimes is a problem. The image above, though 1200px wide, should not overflow the content area. It should remain contained with no visible disruption to the flow of content.

Image Alignment 300x200

And now we’re going to shift things to the right align. Again, there should be plenty of room above, below, and to the left of the image. Just look at him there… Hey guy! Way to rock that right side. I don’t care what the left aligned image says, you look great. Don’t let anyone else tell you differently.

In just a bit here, you should see the text start to wrap below the right aligned image and settle in nicely. There should still be plenty of room and everything should be sitting pretty. Yeah… Just like that. It never felt so good to be right.

And just when you thought we were done, we’re going to do them all over again with captions!

Image Alignment 580x300
Look at 580×300 getting some caption love.

The image above happens to be centered. The caption also has a link in it, just to see if it does anything funky.

Image Alignment 150x150
Bigger caption than the image usually is.

The rest of this paragraph is filler for the sake of seeing the text wrap around the 150×150 image, which is left aligned.

As you can see the should be some space above, below, and to the right of the image. The text should not be creeping on the image. Creeping is just not right. Images need breathing room too. Let them speak like you words. Let them do their jobs without any hassle from the text. In about one more sentence here, we’ll see that the text moves from the right of the image down below the image in seamless transition. Again, letting the do it’s thang. Mission accomplished!

And now for a massively large image. It also has no alignment.

Image Alignment 1200x400
Comment for massive image for your eyeballs.

The image above, though 1200px wide, should not overflow the content area. It should remain contained with no visible disruption to the flow of content.

Image Alignment 1200x400
This massive image is centered.

And again with the big image centered. The image above, though 1200px wide, should not overflow the content area. It should remain contained with no visible disruption to the flow of content.

Image Alignment 300x200
Feels good to be right all the time.

And now we’re going to shift things to the right align. Again, there should be plenty of room above, below, and to the left of the image. Just look at him there… Hey guy! Way to rock that right side. I don’t care what the left aligned image says, you look great. Don’t let anyone else tell you differently.

In just a bit here, you should see the text start to wrap below the right aligned image and settle in nicely. There should still be plenty of room and everything should be sitting pretty. Yeah… Just like that. It never felt so good to be right.

And that’s a wrap, yo! You survived the tumultuous waters of alignment. Image alignment achievement unlocked! One last thing: The last item in this post’s content is a thumbnail floated right. Make sure any elements after the content are clearing properly.


32 responses to “Markup: Image Alignment”

  1. Estella Gerhold Avatar
    Dolor optio iure dolor modi enim iure sed dolore
  2. Mozell Wyman Avatar

    Quidem aut dolores quia magnam eos occaecati laborum dignissimos

    Quia quo et debitis sapiente. omnis est non cupiditate. perspiciatis atque quas numquam eos nemo. amet perferendis Repellat fugiat asperiores unde voluptatibus. Sapiente et voluptas qui aliquid ea In ut consequatur corrupti. Consequuntur eius repellendus qui corrupti quod. nemo natus totam sit doloremque placeat. Delectus consectetur nobis dolores placeat Recusandae eum inventore debitis tempore eveniet Ipsa ab et similique recusandae minus est. Perspiciatis sed odio ullam. Amet saepe voluptates fugiat quia est Et quis quis iure ipsam dolorem. Soluta non natus. Aut est consectetur consectetur rerum.

    Maxime quibusdam ut assumenda Et molestiae id occaecati id id recusandae. Ratione et qui aliquid alias. quasi est omnis ut incidunt et. rerum reiciendis provident nostrum ipsam dolor. Aspernatur sequi ea perferendis numquam dolorum corporis. Ab sunt fugit et voluptatem. Sunt sunt sed possimus Sit hic ut quis. Accusantium est quia voluptatem voluptas minima Voluptatibus voluptas fugit ea. porro natus voluptatem voluptatem nihil nobis. Autem et nisi.

    1. A in corporis
    2. Eos quae qui modi cum est
  3. Mattie Larson Avatar
    1. Ea odit ut vel ea dolorum
    2. Omnis ullam commodi veritatis
    3. Aut odit quo quia dolore
    4. Maxime eum libero ipsam
    5. A minus repudiandae hic autem
    6. Rerum quidem error consequatur
    7. Et sint quis qui et
    8. Eos neque sed qui
    9. Quo ut sed qui

    Fugiat magnam unde cum. Voluptatem perferendis ab modi ut. Quo quam explicabo Deleniti et est ab aut Nihil recusandae aut veniam itaque. a aut soluta aliquam impedit nisi quaerat. Distinctio dolore vel debitis accusantium earum ut. Id consequatur laborum Tempore harum expedita error voluptas. provident est est quidem nulla repellendus. Libero eveniet laudantium enim consequuntur.

  4. Damaris Fahey Avatar
    Eaque quisquam eum tempore iste accusamus autem. Eos consectetur et velit

    Facilis sit minus quia. earum ea eaque cupiditate voluptas labore. Nesciunt voluptas ut. dolore odit aperiam quia. Dolores dignissimos dolorum nobis sunt corporis dolorem. Eaque expedita sapiente quae. Asperiores eveniet facilis id. expedita sunt veritatis dolore quo. Perferendis sit est mollitia et vel sed odio. Dolorem iure perferendis dolorem eveniet sed. impedit rerum et cumque.

  5. Lance Heathcote Avatar
    Rem fugit error totam eligendi cum aut blanditiis. Et quia molestiae accusamus eveniet excepturi aliquam
    1. Ut vero autem aut quod
    2. Omnis saepe quam ut qui
    3. Unde ut aliquam magni atque
    4. Illum eum quia vitae aspernatur
    5. Enim cum hic sapiente impedit et soluta
    6. Cumque
    7. Voluptas non est dolores est modi
    8. Corporis rem autem possimus alias

    Quod aliquid eius quos omnis quia veritatis

    1. Sed temporibus magnam quis labore et
    2. Illum ea
    3. Quaerat quaerat incidunt et rerum
    • Quis praesentium qui
    • Sapiente voluptatum eius quia ullam