[Wylug-help] CSS for table and img - can't get rid of gaps

Simon Greenwood sfgreenwood at gmail.com
Thu Nov 19 15:53:06 UTC 2009


I've had the same problem and was trying to find my example that fixed but
the code is in a backup somewhere. This is the official line from Mozilla
which may help:
https://developer.mozilla.org/en/images,_tables,_and_mysterious_gaps

I'm not sure if display: block will work in a vertical table but it's worth
a try.

s/

2009/11/19 Gary Stainburn <gary.stainburn at ringways.co.uk>

> Hi Simon,
>
> tried that, but it made no difference.  I've also noticed that the
> vertical-align for the TD isn't working as the text is at the bottom of the
> cell.
>
> The image is taken on Fedora/Firefox but looks the on WinXP/IE7
>
> http://www1.ringways.co.uk/images/treeview_not_working.png
>
> The images themselves are just 20x20 PNG files with the black lines going
> all
> the way to the edge.
>
> Gary
>
> On Thursday 19 November 2009 15:23:00 Simon Greenwood wrote:
> > Give the images a vertical-align,either bottom or middle. I've got an
> > example somewhere but I would need to find it.
> >
> > s/
> >
> > 2009/11/19 Gary Stainburn <gary.stainburn at ringways.co.uk>
> >
> > > Hi folks.
> > >
> > > I'm creating a tree-view using a table and three images. The logic is
> > > working
> > > fine for generating the html, but I cannot get the css right to
> eliminate
> > > the
> > > gaps between the images.  I don't know if it's the table or the images
> > > that generate the gaps.
> > >
> > > Gary
> > >
> > > table.treeview {
> > >        border-collapse: collapse;
> > >        padding: 0px;
> > >        margin: 0px;
> > >        border: 0px;
> > >        empty-cells: show;
> > > }
> > > .treeview tr {
> > >        padding: 0px;
> > >        margin: 0px;
> > >        border: 0px;
> > >        vertical-align: middle;
> > > }
> > >
> > > .treeview td, .treeview th {
> > >        padding: 0px;
> > >        margin: 0px;
> > >        border: 0px;
> > >        vertical-align: middle;
> > > }
> > >
> > > .teeview img {
> > >        margin: 0px;
> > >        border: 0px;
> > >        padding: 0px;
> > >        hspace: 0px;
> > >        vspace: 0px;
> > >        width: 20px;
> > >        height: 20px;
> > > }
> > >
> > >
> > > --
> > > Gary Stainburn
> > >
> > > Gary's Haircut 700
> > > Please visit http://www.justgiving.com/Gary-Stainburn/ to help me
> > > raise money for Cancer Research - in return I'll have my head shaved
> > >
> > >
> > > _______________________________________________
> > > Wylug-help mailing list
> > > Wylug-help at wylug.org.uk
> > > https://mailman.lug.org.uk/mailman/listinfo/wylug-help
>
>
>
> --
> Gary Stainburn
>
> Gary's Haircut 700
> Please visit http://www.justgiving.com/Gary-Stainburn/ to help me
> raise money for Cancer Research - in return I'll have my head shaved
>
>
> _______________________________________________
> Wylug-help mailing list
> Wylug-help at wylug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/wylug-help
>



-- 
Looking for work
My CV: http://sites.google.com/site/simongreenwoodscv/
Linkedin: http://www.linkedin.com/in/simonfgreenwood
Support for unemployed IT professionals:
http://groups.google.com/group/downtimeuk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/wylug-help/attachments/20091119/4e4eb97c/attachment.htm 


More information about the Wylug-help mailing list