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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:46:04+00:00 2026-05-15T06:46:04+00:00

My problem is that in some screen resolutions the list items are not in

  • 0

My problem is that in some screen resolutions the list items are not in the center of the div while the <ul> is centered.
Does anyone know a solution?
Thanks!

HTML:

<ul class="news-grid">
    <li></li>
    <li></li>
</ul>

Script:

$(function() {
    $('#buttons a').click(function(e) {
        $.get( $(this).attr('href'), function(data) {
            $('.news-grid').quicksand( $(data).find('li'), {adjustHeight: 'dynamic'} );
        }); 
        e.preventDefault(); 
     });
 });

CSS:

.news-grid {
    overflow: hidden;
    margin: 0px;
    padding-left: 0px;
    width: 100%;
    line-height: 1.4em;
}

.news-grid:after {
    content: "";
    display: block;
    height: 0;
    overflow: hidden;
    clear: both;
}

.news-grid li {
    display: block;
    float: left;
    width: 217px;
    text-align: left;
    line-height: 17px;
    color: #686f74;
    height: 268px;
    overflow: hidden;
    background: url(../images/item_png8.png) no-repeat top left;
    margin: 0px 0px 20px 30px;
}
  • 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-15T06:46:05+00:00Added an answer on May 15, 2026 at 6:46 am

    You can do this pretty easily by using this css (assuming you have a reset to clear the margins, paddings and list-style of the ul/li). By setting display to inline and not setting a width, each li will be centered by the ul text-align: center and should space relatively evenly because of the right margin.

    #news-grid
    {
      overflow: hidden;
      text-align: center;
      width: 100%;
      /* whatever other specific styles you want */  
    }
    
    #news-grid li
    {
      display: inline;
      margin-right: 2%;
      /* whatever other specific styles you want */
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's my problem : some section of my website are not so long (in
I want to test the phpDocumentor-alpha, and there's a problem that some people seems
I am using TIdHttpServer to process some commands the problem is that some commands
Ok, my problem is that some providers support SREG and some support only AX
I am a Perl newbie, stuck with another bioinformatics problem that requires some help
I want to create a crawler with C#. The problem is that some websites
i try to read Data from an Oracle-Database. The problem is that in some
I have a problem that I'm working on for quite some time now. I
Im currently facing the problem that when i try to set focus on some
I have a simple problem that I've been stuck on for some time and

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.