Previous Message
Next Message

Centering a div with an image

Sent by Jan_Erik_Moström on 21 December 2007 12:12


Gunlaug Sørtun [EMAIL-REMOVED]> 07-12-21 11.08

>It was ... 10 years ago :-)

I was afraid of that :D

>Try a suitable "shrink to fit" block formatting...
><http://www.w3.org/TR/CSS21/visuren.html#block-formatting>
>...directly on the #jem-photobackground instead, and set those margins
>directly on the same as 'margin: 0 auto'.

I'm probably slightly stupid but from that text I don't 
understand how I achieve "shrink to fit", I tried searching for 
a solution but I don't understand how to do it.

>FWIW: your case is as clear as fog, so you'll only receive info on the
>basics behind centering of elements with unknown dimensions unless you
>provide a proper - live - example for what you're after - the actual case.

What I want is something similar to this:
     <http://www.latik.se/tablesolution.html>
my attempt to get this using only CSS is here:
     <http://www.latik.se/csssolution.html>
which unfortunately requires that I know the picture width.


                     jem
-- 
Jan Erik Moström, www.mostrom.pp.se

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: