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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:53:05+00:00 2026-05-20T04:53:05+00:00

I pretty much tried everything to center #accordion ul . Any suggestions? Code: css:

  • 0

I pretty much tried everything to center #accordion ul.

Any suggestions?

Code:

css:

.container {
    margin: 0 auto;
    overflow: hidden;
    width: 960px;
}

    #accordion {
        float: left;
        position: relative;
        width: 940px;
        height: 200px;
        overflow: hidden;
        margin: 25px 0px 0px;
    }

    #accordion ul {
        list-style: none;
        margin: 0px;
        display: block;
        height: 200px;
        width: 940px;

        }

    #accordion ul li {
        float: left;
    }

    #accordion ul li a {
        background:#FFFFFF none repeat scroll 0%;
        border-right: 2px solid #fff;
        cursor:pointer;
        display:block;
        overflow:hidden;
        width:78px;
        height: 200px;
    }

    #accordion ul li.landscapes a {
        background: url(../images/landscapes.jpg) repeat scroll 0%;
    }

    #accordion ul li.people a {
        background: url(../images/people.jpg) repeat scroll 0%;
    }

    #accordion ul li.nature a {
        background: url(../images/nature.jpg) repeat scroll 0%;
    }
    #accordion ul li.abstract a {
        background: url(../images/abstract.jpg) repeat scroll 0%;
    }

    #accordion ul li.urban a {
        background: url(../images/urban.jpg) repeat scroll 0%;
        min-width:310px;

    }

php:

<div id="intro">
    <div class="container">
        <div id="accordion">
            <ul>
                <?php // Create and run custom loop
                    $custom_posts = new WP_Query();
                    $custom_posts->query('post_type=page_content&page_sections=Slider (Front Page)');
                    while ($custom_posts->have_posts()) : $custom_posts->the_post();
                ?>
                <li class="landscapes"><?php the_content(); ?><></li>
                <?php endwhile; ?>
            </endwhileul>
        </div>
    </div><!-- .container -->
</div><!-- #intro -->

Reference Image:

enter image description here

  • 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-20T04:53:06+00:00Added an answer on May 20, 2026 at 4:53 am

    What if you reduce the width of #accordion ul, either to auto, or just something much smaller? It looks like its set to 940, and its container is 960px. Also could you could try setting margin: 0 auto, on the ul after reducing its size, or text-align: center for #accordian.

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

Sidebar

Related Questions

I have tried pretty much everything suggested on stack overflow and on http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL but
I have tried pretty much everything to get M:M mappings working in S#arp Architecture.
I have pretty much tried everything but still have this same problem. I have
I've pretty much tried everything, but it seems impossible to use expire_fragment from models?
Ok, so I've pretty much tried everything. I bet it's something really simple but
I've read all the posts about dashes and tried pretty much everything mentioned in
Pretty much what it says on the tin. I've tried googling around but can't
The question is pretty much self-explanatory. I Googled many sites, many methods, tried many
UPDATE: Seems to me like it is pretty much an Apple bug. I tried
I've pretty much tried every Python web framework that exists, and it took me

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.