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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:20:14+00:00 2026-06-17T13:20:14+00:00

I have this HTML: <article class=images> <ul class=cf> <li> <a href=#> <img src=http://www.placehold.it/800×600 alt=

  • 0

I have this HTML:

<article class="images">
  <ul class="cf">
    <li>
      <a href="#">
        <img src="http://www.placehold.it/800x600" alt="" />
      </a>
    </li>
  </ul>
</article>

And this CSS:

 * {
  margin: 0;
  padding: 0;
}

 .images ul {
  margin-left: -3%;
  width: 100%;
  background: red;
}
.images li {
  list-style-type: none;
}
.images li img {
  width: 17%;
  margin-left: 3%;
  margin-bottom: 3%;
  float: left;
}

Still, in Safari the ul seems to have some kind of padding on the right.
In Firefox the ul is displayed correctly.

See it for yourself: http://jsfiddle.net/EdCXx/

Is there any way to fix that?

Edit: With Safari 6.0.2 on OS X 10.8.2 it looks like this:
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-06-17T13:20:16+00:00Added an answer on June 17, 2026 at 1:20 pm

    I’m assuming the issue is that you’re using negative margin and this is causing a problem (I don’t have access to a Mac at the moment, so I can’t verify).

    Try changing your CSS to what’s below. I also changed your clearfix to one I picked up a while ago that has had excellent cross-browser results.

    http://jsfiddle.net/EdCXx/4/

    CSS:

    /* Reset */
    * {
        margin: 0;
        padding: 0;
    }
    
    /* Clearfix */
    .clear:after {
        clear: both;
        content: ".";
        display: block;
        height: 0;
        line-height: 0;
        visibility: hidden;
    }
    
    /* Images */
    .images ul {
        width: 100%;
        background: red;
    }
    .images li {
        list-style: none;
        overflow: hidden;
        margin-right: 3%;
        margin-bottom: 3%;
        float: left;
        width: 17%;
        height: 17%;
    }
    .images li img {
        float: left;
        max-width: 100%;
        max-height: 100%;
    }
    

    And tighten up your HTML (not necessary, but it’s prettier):

    <article class="images">
        <ul class="clear">
            <li> <a href="#"><img src="http://www.placehold.it/800x600" alt="" /></a></li>
            <li><a href="#"><img src="http://www.placehold.it/800x600" alt="" /></a></li>
            <li> <a href="#"><img src="http://www.placehold.it/800x600" alt="" /></a></li>
            <li> <a href="#"><img src="http://www.placehold.it/800x600" alt="" /></a></li>
            <li> <a href="#"><img src="http://www.placehold.it/800x600" alt="" /></a></li>
            <li> <a href="#"><img src="http://www.placehold.it/800x600" alt="" /></a></li>
            <li> <a href="#"><img src="http://www.placehold.it/800x600" alt="" /></a></li>
            <li> <a href="#"><img src="http://www.placehold.it/800x600" alt="" /></a></li>
        </ul>
    </article>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been learning RESTful webservices following this tutorial http://www.vogella.de/articles/REST/article.html . As I understand,
I have a HTML structure like this:- <article id=a_post class=a_post> <div id=thumbnail> <img id=shine
I have a seemingly simple html construct: <div class=featured-image img-wrapper full-width> <a href=http://localhost/wordpress/?p=26> <img
I have this HTML: <div id=parent1 class=article> <div class=action></div> <div id=exp1 class=expand></div> </div> <div
I have html div class formated accordingly.... <div class=latest-media-images> <div class=hdr-article>LATEST IMAGES</div> <a class=lnk-thumb
I currently have the the following HTML structure: <div class=article-preview> <h1><a href=>Title</a></h1> <a class=pic-link
Simple HTML code: <section class=> <article class=> <h1>Staff Outing - June 29</h1> <p><img src=<?php
I have a HTML with the following format <article class="cik" id="100"> <a class="ci" href="/abc/1001/STUFF">
I have HTML like this: <article> <header> <hgroup> <h1>Wk 25 </h1> <h2>(18-06 tot 24-06)</h2>
I have this html table: <table class=table-all> <tbody> <tr> <td>BISFENOLO</td> <td>Bisfenolo-AF 10/10</td> <td class=right>€

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.