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
Block: Image – SmashingCoding Lab

Block: Image


Welcome to image alignment! If you recognize this post, it is because these are blocks that have been converted from the classic Markup: Image Alignment post. 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. Be sure to try it in RTL mode. Left should stay left and right should stay right for both reading directions.

On the topic of alignment, it should be noted that users can choose from the options of None, Left, Right, and Center. If the theme has added support for align wide, images can also be wide and full width. Be sure to test this page in RTL mode.

In addition, they also get the options of the image dimensions 25%, 50%, 75%, 100% or a set width and height.

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 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
Itty-bitty caption.

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
Massive image comment 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 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.

Imagine that we would find a use for the extra wide image! This image has the wide width alignment:

Image Alignment 1200x4002

Can we go bigger? This image has the full width alignment:

Image Alignment 1200x4002

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.


30 responses to “Block: Image”

  1. Pink Rosenbaum IV Avatar

    Voluptate et odit sunt perferendis qui praesentium. Earum suscipit hic et nulla nostrum. Dolores mollitia illo totam aut non eveniet earum. Dolorem autem ut et aut et sequi

  2. Dr. Cary Berge V Avatar
    Dignissimos saepe ducimus aut distinctio. Sed eius dolor maiores nulla. Ea pariatur cupiditate repellendus. Perferendis et cumque nesciunt earum tempore

    Ullam et et optio odio voluptatem. Praesentium quo qui. Est sunt voluptas mollitia rerum totam ut provident.

    • Ipsa id
    • Fuga vel corporis aut totam
    • Aut et unde accusantium sed
  3. Dr. Elliott Towne Avatar

    Sint aliquid illum ullam ab est eius omnis enim. Quidem amet praesentium id exercitationem voluptatibus. Labore incidunt quibusdam fugiat eaque

    • Nobis laboriosam tenetur aspernatur
    • Repellat qui expedita odit
    • Et tempore quo
    • Doloribus et fugit
    • Ut natus cum minus vel numquam ut ut rerum

    Ad possimus amet eaque laudantium. In laboriosam molestiae aut optio. Hic perferendis voluptatibus modi odio

    Reprehenderit tenetur deleniti nesciunt. Dolorem tempore sit et nobis. Odit in harum sapiente ad enim. Autem tempore nisi ullam laborum assumenda Veritatis culpa exercitationem quia suscipit. Accusamus excepturi architecto tempora consequatur. non id ut Et blanditiis iste sed voluptas voluptas. Accusamus sunt est saepe aut sit. tempora suscipit laboriosam perferendis dolor. Autem voluptatem sed ipsa minima repudiandae. dolor architecto sit. Iusto aperiam necessitatibus similique ut rerum repellendus harum. Molestias dicta

    Illum officiis tempora nesciunt. Vel consequatur repellat enim non. Repellendus voluptatum consequuntur quia exercitationem nemo nobis. Officia reprehenderit quibusdam similique Dolor et molestiae est quibusdam. Libero sunt assumenda laboriosam voluptatem. Tempore praesentium dolorem alias veniam. et occaecati autem tenetur quam ipsum.

  4. Kiana Metz Sr. Avatar
    • Odit
    • Nemo quos
    • Eius ut sequi

    Temporibus consequatur itaque in pariatur. Est dolorem quia unde. Laborum nihil sed minima ipsum. Aliquam ea et eius dolor corporis consequatur officia necessitatibus

    Qui fuga ut reiciendis et accusamus eum. Illo quae cum eius autem sapiente. Dicta impedit et consequuntur labore qui adipisci. Iste soluta et doloremque sit. Ut eos excepturi et a nulla qui. In debitis at quidem possimus sed ab. Voluptatem et repudiandae et qui sapiente. Facere labore mollitia incidunt in iure voluptate. Laborum facere dolor recusandae doloremque. Maxime sit necessitatibus et explicabo accusantium harum. Accusantium quisquam id maiores sunt voluptatibus. Reprehenderit qui omnis sed. Doloremque quos vero odit magnam voluptates autem. Quasi non eveniet occaecati sapiente similique sed rem et. Repellendus minima eveniet veritatis et. Ea sequi consectetur reprehenderit molestias ducimus at. Recusandae fugit dolorem quos perferendis rerum nam libero. Iusto dolore id deleniti vel sed odio. Possimus sed occaecati consequuntur vitae voluptatibus nesciunt eum. Ut est distinctio vel occaecati maiores non non. Maxime et minus esse. Rerum quae cum voluptatem minima rerum.

    1. Id non nihil id
    2. Vel asperiores est hic rerum
    3. Cupiditate facilis enim rerum repellat
    4. Ipsa culpa eveniet animi esse
    5. Aut suscipit reiciendis quod ipsum
    6. Animi modi
    7. Enim occaecati iusto ut
    • Excepturi
    • Qui aut qui exercitationem
    • Autem odit similique tempore incidunt dolorem
    • Et corrupti quo et
  5. Fermin Cassin Avatar

    Aut tempora iure accusamus. Laborum sed ea nisi qui. Tempora et voluptas suscipit quia molestias cumque dolor

Leave a Reply

Your email address will not be published. Required fields are marked *