Solved

overlay or stack divs

Posted on 2006-07-04
5
1,194 Views
Last Modified: 2008-01-09
Hi guys,

i am having some cross browser issues with this. http://www.innergatedesigns.com/work/roundbox/roundbox.php

it works fine in firefox, but IE the title div does not float over the following div.

<style>
/* set millions of background images */
.rbroundbox { background: url(nt.gif) repeat; }
.rbtop div { background: url(tl.gif) no-repeat top left; }
.rbtop { background: url(tr.gif) no-repeat top right; }


/* height and width stuff, width not really nessisary. */
.rbtop div, .rbtop, .rbbot div, .rbbot {
width: 100%;
height: 25px;
font-size: 1px;
}
.rbcontent { padding:10px; background-color:#ffffff;  border:1px solid #3a3a3a;}
.rbroundbox { width: 100%; margin: 1em auto;}
.rbTitle {
      float:left;
      position:relative;
      top:5px;
      left:10px;
      font-size: 12px;
      font:tahoma;
      color: #F0D900;
      font-weight:bold;
      }
</style>
</head>

<body>
<div class="rbroundbox">
      <div class="rbTitle">test</div>
      <div class="rbtop"><div></div></div>
      <div class="rbcontent">Content</div>
</div>
</body>
0
Comment
Question by:redcable
  • 3
  • 2
5 Comments
 
LVL 30

Accepted Solution

by:
GrandSchtroumpf earned 500 total points
ID: 17039436
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">

div.section {
  background: url(http://www.innergatedesigns.com/work/roundbox/nt.gif) repeat;
}

div.section h2 {
  margin: 0;
  font-size: 100%;
  background: url(http://www.innergatedesigns.com/work/roundbox/tl.gif) no-repeat top left;
}

div.section h2 strong {
  display: block;
  padding: .2em 10px;
  background: url(http://www.innergatedesigns.com/work/roundbox/tr.gif) no-repeat top right;
  color: #F0D900;
}

div.section div.content {
  padding: .4em 10px;
  border: 1px solid #3a3a3a;
  background-color: #ffffff;
  color: #000000;
}

</style>
</head>
<body>

<div class="section">
  <h2><strong>Title</strong></h2>
  <div class="content">Content</div>
</div>

</body>
</html>
0
 

Author Comment

by:redcable
ID: 17039517
works like a charm, thanks mate
0
 
LVL 30

Expert Comment

by:GrandSchtroumpf
ID: 17040615
cheers  :)
0
 

Author Comment

by:redcable
ID: 17048900
does not work in IE.
0
 

Author Comment

by:redcable
ID: 17048996
oops this does work in ie, posted to wrong question sorry
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jquery - show / hide div depending on day and time 19 46
login jsp example 24 48
How to use embargo Date/time in php 29 37
div to fit another div 8 22
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses four methods for overlaying images in a container on a web page
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question