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 8034779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:07:28+00:00 2026-06-05T02:07:28+00:00

Instead of repeating this CSS in my .less file. Would anyone know how to

  • 0

Instead of repeating this CSS in my .less file. Would anyone know how to create a LESS function for the following?

li  #prize-1 span {
                background: url('@{imagesUrl}/1.png') no-repeat;
                width: 874px;
                height: 188px;
            }   
li  #prize-2 span {
                background: url('@{imagesUrl}/2.png') no-repeat;
                width: 874px;
                height: 188px;
            }
  • 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-05T02:07:29+00:00Added an answer on June 5, 2026 at 2:07 am

    Would it not be something like this

    .definition (@image: nameOfImageDefault) {
      background: url('@{imagesUrl}/@{image}') no-repeat;
      width: 874px;
      height: 188px;
    }
    
    li  #prize-1 span {
        .definition(nameOfImage);
            }   
    li  #prize-2 span {
        .definition(nameOfImage);
    }
    

    I am not that familiar with LESS so I think this works

    Edit:

    I am following this example from their homepage

    .rounded-corners (@radius: 5px) {
      border-radius: @radius;
      -webkit-border-radius: @radius;
      -moz-border-radius: @radius;
    }
    
    #header {
      .rounded-corners;
    }
    #footer {
      .rounded-corners(10px);
    }
    

    also which part did not work? the background image? maybe try to take in the entire image path with the name as the variable

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

Sidebar

Related Questions

Instead of just using urllib does anyone know of the most efficient package for
I am following this tutorial on how to create custom spinners. Near the begining
I know this is ultra-basic, but it's an assumption I've always held and would
I need some help figuring this out. I am trying to create a function
For example if I have the following HTML: <div class=someDiv></div> and this CSS: .opacity
My question is based on another question. Instead of repeating a bunch of stuff,
Instead of using an interface like this: public interface IStartable { void Start(); void
Instead of having an add() method in the repository, I would like to overload
table1 -> id, time_stamp, value This table consists of 10 id's. Each id would
I'm setting a view background to a repeating image using colorWithPatternImage. If the view

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.