Center floating elements in a full-sized div

I work on a product catalog page and the group of images should be focused, but I still have to find a way to do this, since they are all placed in a div that is 100% wide.

I am looking for a way to center these images horizontally without losing the flexibility of my floating properties.

Here is a link to the catalog on the site: http://internetvolk.de/katalog/

+3
source share
4 answers

try using display: inline-block;istead of float and add text-align: centerto parent container)

+3
source

Addition with the following rules:

#katalog {
    text-align: center;
}

and

.imageLink {
    /** float: left; <-- REMOVE! */
    display: inline-block;
}
+2
source

#katalog - . .

#katalog{
width: 960px; /*just an example*/
margin: 0 auto;
}
0
#katalog {
    margin: 10px auto 0;
    overflow-y: hidden;
    max-width: 940px;
    min-width: 810px;
}

max-height min-height, , max-width, , margin: 0 auto;

0

All Articles