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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:39:05+00:00 2026-05-31T17:39:05+00:00

This is my code : <div class=container> <a class=link href=http://www.website.com>My Link</a> </div> .container {

  • 0

This is my code :

<div class="container">
    <a class="link" href="http://www.website.com">My Link</a>
</div>

.container
{
    width:400px; 
    text-align:center;
}

.link
{
    background-color:red;
    font-size:14px;
}

I don’t want to use inline block (because IE7 doesnt support it).
And I don’t want to use margin/padding left to my div container to center it, setting block to the link.

Is there any way to make a fixed height for this kind of situation? Line-height doesnt get background-color, and my font-size must be 14px.

  • 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-31T17:39:06+00:00Added an answer on May 31, 2026 at 5:39 pm

    inline-block support with the * hack. write like this:

    .link
    {
        background-color:red;
        font-size:14px;
        display:inline-block;
        *display:inline;/* For IE7*/
       *zoom:1;/* For IE7*/
       vertical-align:top;
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: <div class=container> <div class=row> <div class=col> <a href=1 class=delete_activity>x</a> </div>
I have this html code <div id=b_container> <div id=b_header> <div class=header_left><a href=#>link 1 </a></div>
Im using this code to show/hide a div: <a href=# class=show_hide>Show/hide</a> <div class=slidingDiv> My
My application is programmatically generating some html code like this: <div class=container> <div class=class1>
Lots of div and classes name are being used in the code. http://www.csszengarden.com/ Is
This code attempts to dynamically switch the class of the StateContainer div from StateOne
Here is some code: var class = function(elem,div){ this.elem= elem; this.div = div; this.init
I have this HTML code: <div class='com_box'> <div class='com_box_c'> <div class='com_box_info'> <a id='quote'>quote</a> </div>
Suppose I have the following html: This a test of <code>some code</code>. <div class='highlight'>
Using this code var html='<div class=somediv></div>'; var target=document.getElementById('contentArea'); target.appendChild(html); I'm getting Uncaught Error: NOT_FOUND_ERR:

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.