473,385 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

cross browser border-collapse

Hi

========
Problem:
========

I want images in table rows connect vertically.
All images are 32 px in height.

=====
Code:
=====

<style="text/css" media="screen">
table, tr, td { padding: 0; border-collapse:collapse;}
td img { vertical-align: text-bottom}
</style>

<table>
<tr>
<td><img></td>
<td><img><img></td>
</tr>
<tr>
<td><img></td>
<td><img><img><img></td>
</tr>
</table>

==========
Rendering:
==========

See http://lingo.uib.no/daniel/border_collapse.gif.

Note: IExplorer has no vertical space between the imgs,
Mozilla has 1 px, and
Opera has 2 px.

I want the "IExplorer way" cross browser-wise.
Any help is appreciated.
Thx,
- Daniel

Jul 20 '05 #1
7 9305
In article <MP************************@nntp.uib.no>, ju**@uib.no says...

I want images in table rows connect vertically.
IExplorer has no vertical space between the imgs,
Mozilla has 1 px, and
Opera has 2 px.

Supplement:

This is the same if I put it in divs instead of tds (changed css
respectively):

<div> <img> <img> text </div>
<div> <img> <img> <img> text </div>
<div> <img> <img> <img> text </div>

There are vertical gaps. I have now found out why. I stripped too much
in the code excerpt; I forgot to include the links. It was really more
like this:

<div> <img> <a> <img> text </a> </div>
<div> <a> <img> </a> <img> <img> <a> <img> text </a> </div>

and so on. It seems to work only if either the whole line is linked or
nothing is linked at all (including img and text):

<div> <a> <img> </a> <a> <img> </a> <a> text </a> </div>
<div> <a> <img> </a> <a> <img> </a> <a> text </a> </div>

aligns fine in all browsers.

<div> <a> <img> <img> text </a> </div>
<div> <a> <img> <img> text </a> </div>

as well.

A non-linking text or img along with linking ones inserts extra vertical
space in Opera and Mozilla. I have tried a lot now. Even style
definitions like

a { border:0; margin:0; border-collapse:collapse; }

wouldn't do the trick. I want to get rid of the spaces, and I'd rather
not dummy-link all elements in a row, as you might understand.
Any help is highly appreciated.

- Daniel



I want the "IExplorer way" cross browser-wise.
Any help is appreciated.
Thx,
- Daniel

Jul 20 '05 #2
Daniel Jung wrote:
I want images in table rows connect vertically.
First, read:
http://devedge.netscape.com/viewsource/2002/img-table/

Then, make sure you have border-collapse: collapse; set
http://www.w3.org/TR/CSS21/tables.ht...order-collapse

Border width should be 0 by default, so no need (iirc) to set border: 0;
for td.
All images are 32 px in height.


No matter what their dimension is.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #3
Daniel Jung wrote:
ju**@uib.no says...
I want images in table rows connect vertically.
Supplement:

This is the same if I put it in divs instead of tds


Well, stop; which markup is correct? Is it tabular data or not? Css is
secondary, since it's optional, so always start with the correct markup.

There are vertical gaps. I have now found out why. I stripped too much
in the code excerpt; I forgot to include the links. It was really more
like this:

<div> <img> <a> <img> text </a> </div>
<div> <a> <img> </a> <img> <img> <a> <img> text </a> </div>

and so on. It seems to work only if either the whole line is linked or
nothing is linked at all (including img and text):

<div> <a> <img> </a> <a> <img> </a> <a> text </a> </div>
<div> <a> <img> </a> <a> <img> </a> <a> text </a> </div>

aligns fine in all browsers.


Hmm, I can't figure out how that would change it, unless there's
something you're not telling us. Well, come to think of it, there *is*
something you're not telling us. What is the url?

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #4
In article <10*************@corp.supernews.com>, usenet3
@julietremblay.com.invalid says...
Daniel Jung wrote:
This is the same if I put it in divs instead of tds
Well, stop; which markup is correct? Is it tabular data or not?


As you may have figured, i changed it from table to div since it wasn't
really tabular data. It was in the beginning, but I moved far from that
in the process.
Hmm, I can't figure out how that would change it, unless there's
something you're not telling us. Well, come to think of it, there *is*
something you're not telling us. What is the url?


It's local. Maybe I can upload it, but I wrote everything noteworthy in
the two postings.

Thanks for a quick reply, Brian.

- Daniel
Jul 20 '05 #5
In article <10*************@corp.supernews.com>, usenet3
@julietremblay.com.invalid says...
Daniel Jung wrote:
I want images in table rows connect vertically.
First, read:
http://devedge.netscape.com/viewsource/2002/img-table/


Nice reading, but doesn't really answer my question. I have to have a
transitional doctype declaration. And I changed it from table to div
btw.
Then, make sure you have border-collapse: collapse; set
http://www.w3.org/TR/CSS21/tables.ht...order-collapse


I put that in the style section which I submitted previously. So that's
taken care of.
All images are 32 px in height.


No matter what their dimension is.


Not really, since an img with 33 px height would cause a 1 px gap for a
32 px height img (optically). To make sure that that is not the error
source, I specified all imgs 32 px height. (redundantly, I know, since
even IE wouldn't have rendered it the way it does, as I said, and made a
screenshot of).

- daniel
Jul 20 '05 #6
Daniel Jung wrote:
Brian says...

As you may have figured, i changed it from table to div since it
wasn't really tabular data.
Well, you should still read the article from devedge whose link I
already gave you. The point of that article -- the baseline and
descender space.

You may consider floating the images left: that will change their
display to block, removing any consideration of descender space. But
floats often create their own problems.
What is the url?


It's local. Maybe I can upload it,


No "maybe" about it; need to see it if you still can't get it to work
after dealing with the baseline issue. ;-)
but I wrote everything noteworthy in the two postings.
Says you. You never know what might be affecting it.
Thanks for a quick reply, Brian.


Of course.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #7
Daniel Jung wrote:
us*****@julietremblay.com.invalid says...
Daniel Jung wrote:
I want images in table rows connect vertically.
read: http://devedge.netscape.com/viewsource/2002/img-table/


Nice reading, but doesn't really answer my question. I have to
have a transitional doctype declaration.


That's too bad.
And I changed it from table to div btw.


So you told us. But baseline and descendor space have to do with all
inline content, not just inline content in a table. The devedge article
talks about tables because it discusses table layouts "blowing apart."

Have you tried floating the images?

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: bayram guzer | last post by:
hi everybody, i have very strange error. i can not see some of the asp pages on my browser. when i look from view source, all the source is there but browser does not show anything, just an empty...
5
by: CJM | last post by:
I'm developing a site for a charity which I am aiming to make standards-compliant, accessible and cross-browser compatible. I'm doing OK so far and have the workings of a respectable site, but I...
8
by: lawrence | last post by:
Under the domain publicpen.com I've several dozen sites in subdiretories, such as www.publicpen.com/honenbeger. I've no trouble with any of these sites. But under one, which I put in yesterday,...
34
by: Marian Aldenhövel | last post by:
Hi, I am in the process of embarking on building a large web application. I wanted to seize that opportunity to learn how to use CSS and get rid of my ad-hoc approach to HTML-coding (i.e.: add...
2
by: Morten | last post by:
Hi. I'd like to be able to make tooltips for some "span" elements. So I'd do like: <dic class="toolblock">Stuff<span class="tooltip">Something about "Stuff"</span></div> and then use the below...
7
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
11
by: muraii | last post by:
Hi all, I've trolled through Google, a little of evolt, css-discuss archives, and sent the list a request, all to no avail. I consulted positioniseverything.net and quirksmode.org. The issue I...
9
by: WRH | last post by:
Hello I am new to asp but I made some Jscript functions which work fine. The functions contain some strings used as a registration key for some apps. It is important that these strings not be...
1
by: Dan | last post by:
Hi, I was wondering if anyone could come up with a cross browser image transition that I could use... I have already made one that works in IE but i know it doesn't work in Mozilla Firefox. ...
1
by: aotash | last post by:
This javascript shows and hides description (like alt in image tag). It works in IE but not in Mozilla, what is wrong please help: <SCRIPT LANGUAGE="JavaScript"> // ############## SIMPLE...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.