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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:00:20+00:00 2026-05-26T05:00:20+00:00

I have done a simple tab layout by using html <ul><li> with some CSS

  • 0

I have done a simple tab layout by using html <ul><li> with some CSS, my code example is here on jsfiddle .
HTML:

<div>
    <ul>
        <li><a href="#"><img src="http://www.sizzledcore.com/wp-content/themes/SizzledCore-7.0/images/facebook.png" alt="Icon" /></image></br>One</a></li>
        <li><a href="#">Two</a></li>
        <li><a href="#">three</a></li>
    </ul>
</div>

CSS:

li{
   float: left;
}

a{

  color: #ffffff;
  background-color: #003300;

  padding-right: 32px;
  padding-left: 32px;
  display: block;
  line-height: 50px;
  text-decoration: none; 

}

a:hover {
  color: #ffffff;
  background-color: #990000;
}

After you looked at my code, you saw I tried to have a image on top of the text on each tab, in my current code, I only did it on the first tab, but it looks urgly, so, I start to doubt am I using a good way to do it? Could some one give some suggestions on the correct way to have a image above tab text as each tab’s content based on my code ?

P.S. What I mean urgly on my current implementation is that there is a big gap between image and text on the tab.

  • 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-26T05:00:21+00:00Added an answer on May 26, 2026 at 5:00 am

    I prefer that solution:

    http://jsfiddle.net/Pq7LC/13/

    HTML:

    <div>
        <ul>
            <li class="facebook"><a href="#">One</a></li>
            <li><a href="#">Two</a></li>
            <li><a href="#">three</a></li>
        </ul>
    </div>
    

    CSS:

    li
    {
        float: left;
        background-color: #003300;
    }
    
    li:hover
    {
        background-color: #990000;
    }
    
    a
    {         
        color: #ffffff;
        padding: 35px 32px 7px;
        display: block;
        text-decoration: none;
    }
    
    a:hover
    {
        color: #ffffff;
    }
    
    .facebook
    {
        background-image: url('http://www.sizzledcore.com/wp-content/themes/SizzledCore-7.0/images/facebook.png');
        background-repeat: no-repeat;
        background-position: 50% 10px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've done some simple string -> DateTime conversions before using DateTime.ParseExact(), but I have
I hope I am not missing something very simple here. I have done a
I want to do a simple drag-drop using jQuery. I have not done anything
I have done simple java app for blackberry, while building am getting following error.
I have recently done a very simple highlighting with jQuery and a highlight plugin.
I'm looking for a simple way to have this done. I would to have
I have done some searches looking for information about how to do logging with
I have written a tab based iPad application which has done well. I never
I am using poedit with zend_translate. I have done everything required in zend. I
I have a simple html option/select (dropdown) menu. I want to use JQuery to

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.