|
Posted by Els on 01/13/06 13:38
David Graham wrote:
> From: "Els" <els.aNOSPAM@tiscali.nl>
>> David Graham wrote:
>>> "Els" <els.aNOSPAM@tiscali.nl> wrote in message
>>> news:10gw89ckaxzfe.1efd82rglvqdw$.dlg@40tude.net...
>>>
>>>> Here's an example I made 2 years ago:
>>>> http://locusmeus.com/test/thumbswithcaptionscentered.html
>>>
>>> I thought I would put a line of code into the page above to outline the
>>> tables in white as below:
>>>
>>> table{
>>> width:115px;
>>> margin-top:0px;
>>> margin-bottom:0px;
>>> padding:0px;
>>> text-align:center;
>>> display:inline;
>>> border: 2px solid rgb(255,255,255);
>>> }
>>>
>> IE and Opera each have their own reason: IE because it extends boxes
>> to encompass their content, and Opera because of "inline-table" (which
>> is hidden from IE).
>
> So inline-table is a value for the display property that changes the
> behaviour of Opera in that a table with a fixed height and width on it's
> td's behaves more like the broken behaviour of IE and enlarges to accomodate
> the content- have I summarised what you are saying correctly?
Not entirely sure, but it sounds like it, yes. Only I would not say
that inline-table behaves like the broken behaviour of IE, but rather
that in Opera, a table with display:inline-table behaves as it should,
and that IE coincidentally, due to its broken behaviour, *seems* to do
the same thing with display:inline on a table.
>> On a new site I'm working on, I'm having the border I want though, as
>> the <td> does show a border in the right place in all 3 browsers. I
>> just tried that technique on the thumbnails page, and found you could
>> fake a table border by setting the cellspacing to 0, and set borders
>> on every td, make the border bottom of top td and top border of bottom
>> td 0. Also added a 1px margin to the tables, to make IE separate them
>> visually.
>>
>> Result:
>> http://locusmeus.com/test/thumbswithcaptionscentered-borders.html
>>
> Very clever idea.
>
> Oh, one last thing, you said you used tables because the images would be
> vertically centered, is that the default behaviour for tables and image
> position inside the td's? I suppose a div would place the image top left
> inside the div if there was no positioning css - is that true?
Yup. Default for td's content (whether image or text) is left and
middle aligned, while you can't vertically center content in a div
other than by setting explicit top and bottom margins or using
position:absolute with explicit negative margins.
> BTW - sort of started a new thread yesterday on this thread - please ignor
> it
Didn't even see it :-)
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Navigation:
[Reply to this message]
|