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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:55:51+00:00 2026-05-28T15:55:51+00:00

What I am trying to do is position a list element over an inline

  • 0

What I am trying to do is position a list element over an inline image rather than a background image.

I found that by trying to use a background image it wouldn’t scale on a desktop browser like the other images and it made it very hard to test.

The image itself is a white box which will contain some flag buttons in it and at the moment the list is appearing underneath the image, not inside it.

Before, I did almost have it but I was using absolute positioning on the list and percentages for top and left values and on some devices it looked ok whereas on others it was a mess so I am just looking for a method that should be consistent in appearance across mobile devices.

HTML

<div id="wrapper"> 
    <div id="top_header"><img alt="top banner" src="/img/banner_home_page.png" /></div>
    <div id="international">
        <span id="flag-container">
        <img src="../img/flag-home.png" />
            <span class="flag_buttons_container">
            <ul class="flag_buttons">
                <li><a href="www.uk-site.co.uk"><img src='./img/buttons/flag_uk.png'/></a></li>
                <li><a href="http://www.ie-site.ie"><img src='./img/buttons/flag_ie.png' /></a></li>
                <li><a href="http://www.us-site.us" ><img src='./img/buttons/flag_us.png' /></a></li>
                <li><a href="http://www.german-site.de" ><img src='./img/buttons/flag_de.png' /> </a></li>
            </ul>
            </span>
        </span>   
    </div>
</div>

CSS

#international{float: left; width: 100%; height: auto; margin: 0px; padding: 10px 5px 10px 5px;}
#international img{width: 92%;}


#flag-container {
     position: relative;
     top: 5px;
     left: 5px;
}

.flag_button_span {
position: absolute;
    margin:0;
    padding: 0px 0;
}

.flag_buttons li {
    list-style-type: none;
    position: relative;
    display: block;
    margin-left: 12%;
    width: 85%; 
    overflow:auto;
}

.flag_buttons img {
    float: left;
}

Image Dimensions

The banner image is 480 px x 108px

The ‘background’ image is 400px x 456px

Each flag button is 164px x 30 px and there are 7 of them, I have only shown a few in the markup above.

I was reading online that to have an element on top of an image it had to be in a span which is why the markup is the way it is but feel free to change it to whatever works.

Any help appreciated.

Thanks.

  • 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-05-28T15:55:53+00:00Added an answer on May 28, 2026 at 3:55 pm

    Using CSS3 for your background image should work as you want with scaling without this hassle of hovering over an inline image. Check out these links:

    http://www.css3.info/preview/background-size/

    http://css-tricks.com/perfect-full-page-background-image/

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

Sidebar

Related Questions

I am trying to position a gradient over an inline / inline-block anchor link,
I'm trying to use the position of the mouse to calculate the scaling factor
I am trying to write a procedure order(List,Result) that has a List as input
I am trying to retrieve the position of an HTML element inside a paragraph.
I've got a fairly long list of divs which I'm trying to use as
I am trying to find the index position of the minimum element in a
I'm trying to make hover effect which will change height of li (list) element
I'm trying to make something like a spellchecker, that will list possible words under
I should write function that takes list, element and return positions in with such
I'm trying to position a button. I want it to be above the Gå

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.