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

  • Home
  • SEARCH
  • 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 7963715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:40:26+00:00 2026-06-04T05:40:26+00:00

css: * { margin:0; padding:0; } .blue-button { width:auto; display:inline-block; } .blue-button:before { /*background-image:url(‘blue-button.gif’);*/

  • 0

css:

  * {
        margin:0;
        padding:0;
    }

    .blue-button
    {
        width:auto;
        display:inline-block;
    }

    .blue-button:before
    {
        /*background-image:url('blue-button.gif');*/
        background:red;
        width:5px;
        height:21px;
        display:block;
        content:"\00a0";";
        float:left;
    }

    .blue-button span
    {
        background:#00AEEF;
        display:block;
        height:100%;
        text-align:center;
        margin-left:5px;

        padding:3px;
        padding-left:8px;
        padding-right:8px;
        color:white;
    }

body:

<div class="blue-button"><span>abcdef</span></div>

So basicly this is just a div with prepended div using before. I want span inside .blue-button to resize to the text. It works fine on Chrome but fails on IE/FF – in those browsers blue div is in the next row (it should be in the same row as red div). How I can fix it?

  • 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-04T05:40:28+00:00Added an answer on June 4, 2026 at 5:40 am

    This is a problem due to IE being unable to recognize the attribute

    display: inline-block;
    

    IE explorer will display it inline, and to achieve the desired effect you need to give the content ‘Layout’ using

    zoom: 1;
    

    or similar.

    This article was helpful to me, check it out to fully understand what I’m trying to say!

    http://flipc.blogspot.co.uk/2009/02/damn-ie7-and-inline-block.html

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

Sidebar

Related Questions

My current CSS: .DataForm input { margin-right:9px; display: inline-block; width:21%; min-width:30px; } works fine
My Css #container{ display:block; } #container ul{ list-style:none; position:relative; margin:0px; padding:0px; display:block; } #container
<html> <head> <style type=text/css rel=stylesheet> * {margin:0;padding:0;} div#box {background-color:green;width:1000px;} /* #box {position:absolute;top:0;right:0;} */ /*
<!DOCTYPE html> <html> <head> <title>MyTitle</title> <style type=text/css> body { background-image:url('images/my.png'); /*width:100%;*/ height:100%; background-repeat:no-repeat; background-size:100%;
is -negative margin or padding are invalid CSS aaccording to W3C ?
Putting this at the top of your CSS file: * { margin: 0; padding:
I have a following HTML/CSS (simplified): <body> <style> body { margin: 0px; padding: 0px;
I have a button with a background-image property that sets 1) an icon for
I'm struggling to determine where in my CSS the padding/margins should go to keep
I have the following jQuery function: $(function(){ if ($(.menu li).hasClass(active)) { $(.active).css(margin-top, 6px); }

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.