Why does display:table-cell not center content without display:table?

I'm looking for the most efficient (or elegant) way to vertically and horizontally center content of variable height. I've come up with this: [http://cssdeck.com/t/2veysdkg/16][1], which uses css t... Read more

No answers yet

Centering an absolutely positioned div

I'm running into a bit of a problem attempting to center an absolutely positioned div on top of another div. The background div runs a jQuery Cycle slide show. The div I want to position contains... Read more

No answers yet

VCentering a BG image within its parent div

Hi there I'm trying to vertically center a background image in its parent element. See what I'ved used below but it's not working. Do I need to revert to padding on the parent instead? Than... Read more


1 answer Latest by Ktash over 7 years ago

Goro 0

Center a DIV with floating DIVs inside of it

Hello, The layout I'm creating has an arbitrary number of boxes (DIVs) that flow depending on the page (see picture for graphical explanation). I want the boxes to flow left, so that depending o... Read more

2 answers Latest by Ktash over 7 years ago

Centering elements in a fluid layout

I am having problems centering elements in a fluid layout where the screen size is less than the screen size I'm developing on (1440 x 900 px). For example, if you go to www.sdeyservices.co.uk w... Read more


1 answer Best answer by Sisira

How can I make an entire table cell into a link?

I want to achieve a block with an image background and text centered vertically and horizontally within it, and have the entire block act as a link. I've looked at various ways of doing this with `... Read more

6 answers Best answer by webcodeslinger

Relative-placed div looks different in every browser

Is it possible to successfully use a relative placed div so that it works well in every browser? Check out my website, specifically the black circle with the service grant announcement.. --I... Read more


2 answers Latest by Ktash almost 9 years ago

How can I center a table in IE?

Simple question. Don't know about the answer though. This is what I use to center tables and it works, on Chrome at least. Read more

2 answers Latest by Leslie N almost 9 years ago

Centering an element that has an icon as a background image

Hi all - I keep having this issue come up and have always found a different, kludgey way to accomplish this, so I'm looking for some definitive help. I need to center a link that has a backgr... Read more

4 answers Best answer by danwellman

Centering a floated ul of unknown width?

I'm trying to center a navigational menu on my page but coming across some trouble. I found a few examples that say to wrap the ul in a containing div with a width of 100% and the overflow hidden.... Read more


2 answers Latest by Bill Addison almost 9 years ago