Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9162697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:16:22+00:00 2026-06-17T14:16:22+00:00

I’m trying to use a polaroid effect on an image but I would like

  • 0

I’m trying to use a “polaroid” effect on an image but I would like to have it full size (about 200px) when in a desktop screen, but have it scale, for example 50%, when viewed on a mobile device.

To achieve this, I think I have to use @media queries right? I’ve never used media queries so I’ll need some help. If not, can anyone point me to a method in which I can make this work, without javascript?

I have the following code:

HTML:

<section id="splash">
            <header>Celso Santos</header>
            <div class="container">
                <div id="polaroid">
                    <figure>
                        <img src="img/zedblade.jpg" alt="Celso Santos" />
                        <figcaption>Geek</figcaption>
                    </figure>
                </div>
            </div>
        </section>

and the CSS:

    /***Position the figures containing the images and captions***/
#polaroid figure {
    /*float: left;*/ /*places the images in a horizontal line*/
    position: relative; /*allows precise positioning of the tape in step 5- see support section below for more info*/
    width: 178px; /*width of the images*/
    /*margin: 0 auto; /*space between the images*/
}

#polaroid figure {
    padding: 6px 8px 10px 8px; /*size of the frame*/
    /*give the frame's background colour a gradient*/
    background: #eee6d8; /*fallback colour for browsers that don't support gradients*/
    background: -webkit-linear-gradient(top, #ede1c9, #fef8e2 20%, #f2ebde 60%);
    background: -moz-linear-gradient(top, #ede1c9, #fef8e2 20%, #f2ebde 60%);
    background: -o-linear-gradient(top, #ede1c9, #fef8e2 20%, #f2ebde 60%);
    background: -ms-linear-gradient(top, #ede1c9, #fef8e2 20%, #f2ebde 60%);
    background: linear-gradient(top, #ede1c9, #fef8e2 20%, #f2ebde 60%);
    /*give the Polaroids a small drop shadow*/
    -webkit-box-shadow: 4px 4px 8px -4px rgba(0, 0, 0, .75);
    -moz-box-shadow: 4px 4px 8px -4px rgba(0, 0, 0, .75);
    box-shadow: 4px 4px 8px -4px rgba(0, 0, 0, .75);
}

#polaroid figcaption {
    text-align: center;
    font-family: 'Reenie Beanie', cursive; /* Reenie Beanie is available through Google Webfonts */
    font-size:1.3em;
    color: #454f40;
    letter-spacing: 0.09em;
}

figure:before { /*see the support section below to more info on using the :before psuedo element*/
    content: '';
    display: block;
    position: absolute;
    left:5px; /*postion from the left side of the frame (positive value move the tape right, negative moves it left)*/
    top: -15px; /*position from the top of the frame (positive move it above the frame, negative below)*/
    width: 75px; /*width of the tape*/
    height: 25px; /*height of the tape*/
    background-color: rgba(222,220,198,0.7); /*colour of the tape, use rgba to make it slightly transparent*/
    /*rotate the tape 12 degrees anti-clockwise*/
    -webkit-transform: rotate(-12deg);
    -moz-transform: rotate(-12deg);
    -o-transform: rotate(-12deg);
    -ms-transform: rotate(-12deg);
}

/**The tape for the even numbered images needs to be rotated the opposite way, as the images are, and positioned on the other side of the frame, I've also changed the width slightly**/
figure:nth-child(even):before {
    left:150px;
    top: -15px;
    width: 55px;
    height: 25px;
    -webkit-transform: rotate(12deg);
    -moz-transform: rotate(12deg);
    -o-transform: rotate(12deg);
    -ms-transform: rotate(12deg);
}

For simplification, I’m adding a link to my public dropbox folder with a “live” preview: https://dl.dropbox.com/u/3543277/www/index.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:16:23+00:00Added an answer on June 17, 2026 at 2:16 pm

    To have your image scale, you should set its CSS to this:

    img{
       max-width: 100%;
       height: auto;
    }
    

    This will allow it to flex based on its parent container

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I would like to run a str_replace or preg_replace which looks for certain words
This could be a duplicate question, but I have no idea what search terms
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.