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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:40:16+00:00 2026-05-19T09:40:16+00:00

This is a silly but hopefully legitimate if not particularly needful challenge, one that

  • 0

This is a “silly” but hopefully legitimate if not particularly needful challenge, one that can be reused everywhere by designers, I’m sure, if an answer can be had.

I’m using a WYSIWYG-ish editor (MS Expression Web 4) and am trying to produce HTML-based wireframes which I intend to be the base for actual production. With raw/clean HTML being the #1 objective, I’d like to have a pattern for placeholders whereby I might specify the following HTML (and nothing else, except height, width, and text will vary), which should appear as a rectangular box with an ‘X’ through it and the text (in this case “logo”) appearing at the bottom, or in the middle with white background behind the text:

<div class="placeholder" style="width: 200px; height: 50px;">Logo</div>

My question is what is the CSS and the minimum amount of HTML mucking (e.g. img tag) that is required to achieve what I want? For example, if the following HTML is used instead:

<div class="placeholder">
    <img src="placeholder-xbox.png" width="200" height="200"/>
    Logo
</div>

or

<div class="placeholder">
    Logo
    <img src="placeholder-xbox.png" width="200" height="200"/>
</div>

This would be an acceptable compromise on the HTML side, but then what would be the CSS to make this work?

I know I can use jQuery to hijack clean HTML to generate mucky HTML to achieve what I’m trying to do, but I need this at design-time.

This fake screenshot below is what I’m looking for. I want to drop a tiny snippet of clean HTML and possibly use the anchor points in the WYSIWYG interface to scale the placeholder, while the label stays in the center-bottom or center-middle.
goal

I have an image that is white with a black X through it.
placeholder image

I’m highly doubtful that CSS will support what I want without mucking up the HTML. However, I’d like to see if anyone knows if it’s doable. Here’s what I started with, which of course didn’t work because the background image won’t scale, the text won’t vertically align, etc., etc.

.placeholder { 
 display: inline;
 background-image: url('placeholder-xbox.png');
 border: 2px solid black;
    vertical-align: bottom;
}

So now I have to figure out what compromises to make. I hate mucking up the HTML and don’t mind mucked up CSS because a CSS class is reusable.

  • 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-19T09:40:17+00:00Added an answer on May 19, 2026 at 9:40 am

    When I want placeholders like that, I tend to just do something like:

    <div id="logo">logo</div> and #logo{ background:#ccc; border:1px solid red }.

    So, it would look like this for you:

    <div class="placeholder" style="width: 200px; height: 50px">
        Logo
    </div>
    
    .placeholder {
        background: #ccc;
        border: 1px solid red;
        text-align: center
    }
    

    It takes extra markup to get the text at the bottom:

    <div class="placeholder" style="width: 200px; height: 50px">
        <span>Logo</span>
    </div>
    
    .placeholder {
        background: #ccc;
        border: 1px solid red;
        text-align: center;
        position: relative
    }
    .placeholder span {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%
    }
    

    Live Demo


    Having just wrote all that, I realised how easy it is to modify it into the creation you described; try this:

    Live Demo

    <div class="placeholder" style="width: 200px; height: 50px">
        <img src="https://i.stack.imgur.com/yZlqh.png" />
        <span>Logo</span>
    </div>
    
    .placeholder {
        background: #ccc;
        border: 1px solid #000;
        text-align: center;
        position: relative;
        font-weight: bold
    }
    .placeholder span {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%
    }
    .placeholder img {
        width: 100%;
        height: 100%
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hopefully this is a silly question but my brain is fried and I can't
Hopefully this will not come across as a silly or pedantic question, but I'm
I know this question might be little silly but I can't seem to find
This question may be silly but i accidentally checked in java source code that
I know this is silly but I can't overcome my curiosity. Is it possible
This seems really silly but; How can I know which version of ASP.net MVC
I realise this is a silly question but the MSDN can't be accessed from
I know this is going to sound silly but I can't find what's wrong.
I know this may be really silly - but how can I disable the
I know this may sounds silly but I would like to create function that

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.