Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
27
Comments
24

Anar

@anar-sol700 points

I’m a mysterious individual who has yet to fill out my bio. One thing’s for certain: I love writing front-end code!

Latest solutions

  • Vanilla HTML, CSS, JS - Flexbox and Grid - Accessible News homepage

    #accessibility#bem

    Anar•700
    Submitted over 1 year ago

    0 comments
  • Recipe Page

    #bem

    Anar•700
    Submitted over 1 year ago

    0 comments
  • Social links profile component

    #bem

    Anar•700
    Submitted over 1 year ago

    1 comment
  • Simple QR code component


    Anar•700
    Submitted over 1 year ago

    0 comments
  • Simple blog preview card using vanilla CSS

    #bem

    Anar•700
    Submitted over 1 year ago

    1 comment
  • No JS, Vanilla CSS, Flex, Mobile-first, Accessibility - FAQ Accordion

    #accessibility

    Anar•700
    Submitted over 1 year ago

    0 comments
View more solutions

Latest comments

  • Priyanka Roy Choudhury•100
    @PriyankaRC16
    Submitted over 1 year ago

    Product Preview Card Component using HTML and CSS

    1
    Anar•700
    @anar-sol
    Posted over 1 year ago

    Hello =)

    You are opening a div element before the body, it's an invalid HTML. body is supposed to be the main element containing all the content of the page.

    You can use the W3C HTML validator to check your HTML.

    Marked as helpful
  • Joseildo Andrade•90
    @joseildoandrade12
    Submitted over 1 year ago

    css, html and css flexbox

    1
    Anar•700
    @anar-sol
    Posted over 1 year ago

    Hello =)

    If you want to include the image as HTML content instead of using CSS background, you can use picture and source to specify different images for mobile and desktop depending on the viewport size.

    In my solution, I've set the mobile version as the default image and the desktop one starting at 640px width viewport.

    <picture>
        <source media="(min-width: 640px)" srcset="images/image-product-desktop.jpg" width="600" height="900">
        <img src="./images/image-product-mobile.jpg" alt="Gabrielle Essence Eau De Parfum bottle" width="686" height="480" class="card__image">
    </picture>
    

    As you'll see in these MDN and web.dev articles, there are many other situations where picture and source can be useful.

    Marked as helpful
  • shakil-02•20
    @shakil-02
    Submitted over 1 year ago

    Product preview solution

    #astro#chai#fetch#flask#firebase
    1
    Anar•700
    @anar-sol
    Posted over 1 year ago

    Hello =)

    Instead of using two separate img elements, you can use picture and source to specify different images for mobile and desktop depending on the viewport size.

    In my solution, I've set the mobile version as the default image and the desktop one starting at 640px width viewport.

    <picture>
        <source media="(min-width: 640px)" srcset="images/image-product-desktop.jpg" width="600" height="900">
        <img src="./images/image-product-mobile.jpg" alt="Gabrielle Essence Eau De Parfum bottle" width="686" height="480" class="card__image">
    </picture>
    

    As you'll see in these MDN and web.dev articles, there are many other situations where picture and source can be useful.

  • Izzah-23•30
    @Izzah-23
    Submitted over 1 year ago

    product-preview-card-component-main

    1
    Anar•700
    @anar-sol
    Posted over 1 year ago

    Hello =)

    Instead of using CSS background to set the image, you can use picture and source HTML elements to specify different images for mobile and desktop depending on the viewport size.

    In my solution, I've set the mobile version as the default image and the desktop one starting at 640px width viewport.

    <picture>
        <source media="(min-width: 640px)" srcset="images/image-product-desktop.jpg" width="600" height="900">
        <img src="./images/image-product-mobile.jpg" alt="Gabrielle Essence Eau De Parfum bottle" width="686" height="480" class="card__image">
    </picture>
    

    As you'll see in these MDN and web.dev articles, there are many other situations where picture and source can be useful.

  • Akerejola Damilola•80
    @RezoMoney
    Submitted over 1 year ago

    Desktop/Mobile Responsive Product Preview Card Web Site Using Grid.

    1
    Anar•700
    @anar-sol
    Posted over 1 year ago

    Hi =)

    Instead of using CSS to change the image, you can use picture and source HTML elements to specify different images for mobile and desktop depending on the viewport size.

    In my solution, I've set the mobile version as the default image and the desktop one starting at 640px width viewport.

    <picture>
        <source media="(min-width: 640px)" srcset="images/image-product-desktop.jpg" width="600" height="900">
        <img src="./images/image-product-mobile.jpg" alt="Gabrielle Essence Eau De Parfum bottle" width="686" height="480" class="card__image">
    </picture>
    

    As you'll see in these MDN and web.dev articles, there are many other situations where picture and source can be useful.

    Marked as helpful
  • Grunt395•40
    @Grunt395
    Submitted over 1 year ago

    Product Preview Card with HTML and CSS

    4
    Anar•700
    @anar-sol
    Posted over 1 year ago

    Hello =)

    Instead of using two separate img elements, you can use picture and source to specify different images for mobile and desktop depending on the viewport size.

    In my solution, I've set the mobile version as the default image and the desktop one starting at 640px width viewport.

    <picture>
        <source media="(min-width: 640px)" srcset="images/image-product-desktop.jpg" width="600" height="900">
        <img src="./images/image-product-mobile.jpg" alt="Gabrielle Essence Eau De Parfum bottle" width="686" height="480" class="card__image">
    </picture>
    

    As you'll see in these MDN and web.dev articles, there are many other situations where picture and source can be useful.

    Marked as helpful
View more comments
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub