Topic: Overlap issue with CSS Rounded Tables (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=26525" title="Pages that link to Topic: Overlap issue with CSS Rounded Tables (Page 1 of 1)" rel="nofollow" >Topic: Overlap issue with CSS Rounded Tables <span class="small">(Page 1 of 1)</span>\

 
DaveFA
Bipolar (III) Inmate

From: USA
Insane since: Feb 2004

posted posted 08-24-2005 21:12

I'm using CSS rounded tables for a homemade CMS, and I'm having an overlap issue. The CSS and HTML are 100% valid, and they render quite nicely in IE and Firefox. Problem is, in Firefox, I can't stack the rounded tables. They overlap each other. I've tried a number of approaches (yes, even <br clear="all">, and haven't been able to get it to stack nicely in both Firefox and IE (a requirement) unless I set absolute heights or margins - which I can't do, since the content that's going to be in the tables will vary.

An example of what I've got is available at http://sandbox.relativequiet.com/roundCSS/stack.html and the code is below.

CSS:

code:
body {
	background: #fff;
	font-family: verdana;
	font-size: 12px;
	margin: 0;
	padding: 0;
}
img { border: 0;}
table, tr, td { font-size: 12px;}

/* navCorner */
.navWrapper {
	display: block;
	margin: 3px 3px 0 3px;
}
.navCornerTopLeft {
	background: url("../images/topLeft.gif") top left no-repeat;
	height: 26px;
}

.navCornerTopRight {
	background: url("../images/topRight26.gif") top right no-repeat;
	height: 26px;
}

.navCornerTopRight div {
	background: url("../images/topMiddle.gif") center repeat-x;
	height: 26px;
	margin: auto 26px;
	text-align: center;
}

p.navCornerHeadingFix {
	font-weight: bold;
	margin: 0 auto;
	padding: 6px 0 0 0;
}

.navCornerBottomLeft {
	background: url("../images/bottomLeft.gif") bottom left no-repeat;
	height: 16px;
	margin: 0;
	padding: 0;
}

.navCornerBottomLeft div {
	background: url("../images/bottomMiddle.gif") center repeat-x;
	height: 16px;
	margin: 0 0 0 16px;
	text-align: center;
}

.navCornerContent, .navCornerContent p {
	background: #fff;
	margin: 0 2px;
	padding: 0 1px;
}

div.navCornerBottomRight {
	background: url("../images/bottomRight16.gif") bottom right no-repeat;
	height: 16px;
	margin: 0;
	padding: 0;
}



HTML:

code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">
<head>
	<title>Rounded Tables With Divs</title>
	<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
	<meta http-equiv="Content-Language" content="en-us">
	<meta http-equiv="Pragma" content="no-cache">
	<link rel="stylesheet" type="text/css" href="css/stack.css" media="screen">
</head>

<body>

<div class="navWrapper" id="nav1">
	<div class="navCornerTopLeft">
		<div class="navCornerTopRight"><div><p class="navCornerHeadingFix">Section Heading</p></div></div>
		<div class="navCornerContent">
			<p>Lorem ipsum dolor sit amet...[snipped for ease of posting]</p>
		</div>
		<div class="navCornerBottomLeft"><div><div class="navCornerBottomRight"></div></div></div>
	</div>
</div>

<div class="navWrapper" id="nav2">
	<div class="navCornerTopLeft">
		<div class="navCornerTopRight"><div><p class="navCornerHeadingFix">Section Heading</p></div></div>
		<div class="navCornerContent">
			<p>Lorem ipsum dolor sit amet...[snipped for ease of posting]</p>
		</div>
		<div class="navCornerBottomLeft"><div><div class="navCornerBottomRight"></div></div></div>
	</div>
</div>

</body>
</html>



As always, thanks in advance for your expert help.

-----------------------------------
-Dave

Maker of stuff, user of things
-----------------------------------

(Edited by DaveFA on 08-24-2005 21:14)

(Edited by bitdamaged on 08-24-2005 21:59)

Blaise
Paranoid (IV) Inmate

From: London
Insane since: Jun 2003

posted posted 08-24-2005 21:56

Your URL doesn't seem to load for me

DaveFA
Bipolar (III) Inmate

From: USA
Insane since: Feb 2004

posted posted 08-24-2005 22:30

Seems to be working fine for me from three separate workstations at the office. Just in case, I've uploaded a copy to http://www.flavored-air.com/temp/stack.html.

-----------------------------------
-Dave

Maker of stuff, user of things
-----------------------------------

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 08-24-2005 22:43

All of your content for each box is within a navCornerTopLeft div, whose height has been set to 26px. That might explain firefox's interpretation of your code.


 

DaveFA
Bipolar (III) Inmate

From: USA
Insane since: Feb 2004

posted posted 08-24-2005 22:50

Oh duh. Duh duh duh. Wow. This is what happens when you stare at something for too long - you miss the simple stuff.

That totally fixed it. Thanks for noticing that. I've uploaded the fixed code to both Flavored-air.com and sandbox.relativequiet.com.

-----------------------------------
-Dave

Maker of stuff, user of things
-----------------------------------

DaveFA
Bipolar (III) Inmate

From: USA
Insane since: Feb 2004

posted posted 08-24-2005 23:00

Oh duh. Duh duh duh. Wow. This is what happens when you stare at something for too long - you miss the simple stuff.

That totally fixed it. Thanks for noticing that. I've uploaded the fixed code to both Flavored-air.com and sandbox.relativequiet.com.

-----------------------------------
-Dave

Maker of stuff, user of things
-----------------------------------

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

posted posted 08-24-2005 23:05

You could simplify that code a lot by using absolute positioning.

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

posted posted 08-24-2005 23:12

/me grumbles at server

(Edited by reisio on 08-24-2005 23:13)

DaveFA
Bipolar (III) Inmate

From: USA
Insane since: Feb 2004

posted posted 08-25-2005 19:51

I'd like to be able to use absolute positioning, except this template has to work in multiple resolutions on multiple platforms, and it's not going to be holding the same amount of content each time, nor will it look the same.

That said, using absolute positioning is, unfortunately, not plausible in this particular circumstance.

-----------------------------------
-Dave

Maker of stuff, user of things
-----------------------------------

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

posted posted 08-25-2005 20:18

Why's that? I seem to run into a lot of people that think absolute positioning is the devil that kills fluidity. It's not. I'm telling you, with absolute positioning, you wouldn't need all those nested divs. You could have something like this:

code:
<div class="box">
    <h2>whatever</h2>
    <p>whatever</p>
    <div class="one"></div>
    <div class="two"></div>
    <div class="thr"></div>
    <div class="fou"></div>
    <div class="fiv"></div>
</div>

Blaise
Paranoid (IV) Inmate

From: London
Insane since: Jun 2003

posted posted 08-26-2005 11:43

Yeah absolute positioning is ok if used correctly, unfortunatly when developers/designers first learn about CSS they often start creating layouts with absolute positioning where they should be using floats, they end up abusing it.

The secret of absolute positioning is to use it with relative positioning on parent tags, that way when content or size changes you maintain a better consistency.

Cheers,



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu