CSS
HTML
JavaScript
jQuery
PHP
SQL
WordPress
CSS Snippets

Code Snippet

Before we all had cameras in our phones, people could take a Polaroid® photo which would print directly from the camera, and had a unique, framed look.

This framed look can be used to show photos in an interesting way on certain sites, such as a vacation sites, zoo sites, or photo-oriented sites just to name a few.

HTML

				
					<figure class="polaroid">
    <img decoding="async" src="/images/fantasy-beach.jpg" alt="Fantasy Beach" />
    <figcaption class="polaroid_title">Fantasy Beach</figcaption>
</figure>
				
			

CSS

				
					figure.polaroid {
	background-color: white;
    border: #ffffff solid 10px;
    border-top-width: 14px;
  	box-shadow: 4px 4px 8px 2px rgba(0, 0, 0, 0.2);
    transform: rotate(1deg);
}
figure.polaroid img {
	width: 100%;
}
figcaption.polaroid_title {
  	text-align: center;
  	padding: 25px 20px 1%;
}
				
			

Notice that we slightly rotate the image to give it that “tossed in place” look. If you have multiple photos spread out down a page of text, you may want to put a different rotate angle on each so they don’t look so uniformly placed.

Example

1SMARTchicken

Fantasy Beach

We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.

CSS
HTML
JavaScript
jQuery
PHP
SQL
WordPress

Why 1SMARTchicken?

This site was built and is maintained to benefit my autistic son.
See More →

My Son's Name is Johnny

He was diagnosed as autistic quite late, at age four...
His story

Buy Me a Coffee

Thanks for your support!

Feedback

If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.