3 replies [Last post]
paCkeTroUTer
paCkeTroUTer's picture
Offline
Enthusiast
Melbourne, Australia
Last seen: 6 years 9 weeks ago
Melbourne, Australia
Timezone: GMT+10
Joined: 2003-06-27
Posts: 241
Points: 2

I am trying to get rid of double borders generated by Div's which are floated in a row. An example of it can be seen here

How can I get rid of the double borders which gets generated by the adjoining div's ?

Here is the css for the page:

.divRows {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #0099CC;
	background-color: #CCCCCC;
	margin: 0px;
	padding: 10px;
	border: thin solid #CC0000;
	height: 18px;
	clear: right;
	position: relative;
	float: left;
}

http//melbourne.ug.php.net

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 3 weeks 5 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

div border-collapse

Hi paCkeTroUTer,
Since the divs are all floated, and you can't be sure which sides meet other divs, I don't think it's possible.

Border-collapse only works on table elements Sad

paCkeTroUTer
paCkeTroUTer's picture
Offline
Enthusiast
Melbourne, Australia
Last seen: 6 years 9 weeks ago
Melbourne, Australia
Timezone: GMT+10
Joined: 2003-06-27
Posts: 241
Points: 2

Collapse Borders ?

bugger ! So I can't achieve a Table Cell like appearance with CSS ?

http//melbourne.ug.php.net

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 3 weeks 5 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

Collapse Borders ?

You can achieve it if you position each box without floating.
That way you will know which box is next to another.

But then you lose the nice wrapping effect floating gives with window resize.