473,385 Members | 1,564 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.

tabbed display going wrong in Firefox

I try to get a tabbed display work both in IE (6 and 7) and Firefox. The
last does give a problem. What's going wrong here? I'm totally puzzled.

<!doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w4.org/1999/xhtml" xml:lang="nl" lang="nl">
<head>
<title>Tabbed display</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<style>
body
{
text-align:center;
font-family : "Times New Roman", Times, serif;
font-size:12pt;
}

#main
{
position:relative:
color:black;
background-color:#CCCCCC;
border:1px solid gray;
width:800px;
text-align:left;
}

#main h1
{
font-size:3.0em;
font-style:italic;
font-weight:bold;
padding-left:10px;
padding-bottom:0px;
margin-bottom:0px;
}
#main p
{
font-size:1.0em;
font-style:italic;
padding-left:10px;
padding-top:0px;
padding-right:10px;
padding-bottom:10px;
}

#header
{
position:relative;
top:0px;
left:0px;
height:110px;
}

#footer
{
font-size:0.8em;
position:relative;
background-color:#D0D0D0;
width:100%;
text-align:center;
}

#sheet
{
float:clear;
padding-left:20px;
padding-top:20px;
color:red;
}

#tabs
{
float: left;
width: 100%;
height:100%;
background-color:white;/*#CCCCCC;*/
font-size: 100%;
border-bottom: 1px solid black;
line-height: normal;
}

#tabs ul
{
margin: 0;
padding: 0;
list-style: none;
}

#tabs li
{
float: left;
margin: 10px;
padding: 2px 12px 0px 12px;
background-color:#CCCCCC;
border-left:1px solid black;
border-top: 1px solid black;
border-bottom: 0px solid black;
border-right: 1px solid black;
}

#tabs a
{
display: block;
text-decoration: none;
font-weight: bold;
}

#tabs li.current
{
position:relative;
background-color: transparant;
border-left:1px solid black;
border-top: 1px solid black;
border-bottom: 2px solid #CCCCCC;
border-right: 1px solid black;
margin-bottom: 0;
}
</style>
</head>
<body>
<div id="main">
<div id="header">
<h1>Tabbed display</h1>
</div>

<div id="tabs">
<ul>
<li class='current'><a href="#">one</a></li>
<li><a href="#">two</a></li>
<li><a href="#">three</a></li>
<li><a href="#">four</a></li>
</ul>
</div>
<div id='sheet'>
<p>Text per sheet goes here</p>

<div id="footer">
<p>Footer text</p>
</div>
</div>
</div>
</body>
</html>
Apr 29 '07 #1
3 3065
On 2007-04-29, Sjef Janssen <ma*************@planet.nlwrote:
I try to get a tabbed display work both in IE (6 and 7) and Firefox. The
last does give a problem. What's going wrong here? I'm totally puzzled.
There are a few typos in the CSS which
http://jigsaw.w3.org/css-validator will show you.
Apr 29 '07 #2
Sjef Janssen wrote:
}

#tabs li
{
float: left;
margin: 10px;
padding: 2px 12px 0px 12px;
background-color:#CCCCCC;
border-left:1px solid black;
border-top: 1px solid black;
border-bottom: 0px solid black;
border-right: 1px solid black;
}

Then change the margin (bottom) : margin: 10px 10px 0 10px. Then tinker....

Or here's one way:

<!doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w4.org/1999/xhtml"" xml:lang="nl" lang="nl">
<head>
<title>Tabbed display</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<style>
body
{
text-align:center;
font-family : "Times New Roman", Times, serif;
font-size:12pt;
}

#main
{
position:relative;
color:black;
background-color:#CCCCCC;
border:1px solid gray;
width:800px;
text-align:left;
margin : auto;
}

#main h1
{
font-size:3.0em;
font-style:italic;
font-weight:bold;
padding-left:10px;
padding-bottom:0px;
margin:0px;
}
#main p
{
font-size:1.0em;
font-style:italic;
padding-left:10px;
padding-top:0px;
padding-right:10px;
padding-bottom:10px;
}

#header
{
position:relative;
top:0px;
left:0px;
height:110px;
}

#footer
{
font-size:0.8em;
position:relative;
background-color:#D0D0D0;
width:100%;
text-align:center;
}

#tabs
{
float: left;
width: 100%;

background-color:white;/*#CCCCCC;*/
font-size: 100%;
border-bottom: 1px solid black;
line-height: normal;
}

#tabs ul
{
margin: 0;
padding: 0;
list-style: none;
}

#tabs li
{
position: relative;
top : 2px;
float: left;
margin: 10px 10px 0 10px;
padding: 2px 12px 0px 12px;
background-color:#CCCCCC;
border-left:1px solid black;
border-top: 1px solid black;
border-bottom: 0px solid black;
border-right: 1px solid black;
}

#tabs a
{
display: block;
text-decoration: none;
font-weight: bold;
}

#tabs li.current
{
position:relative;
top : 1px;
border-left:1px solid black;
border-top: 1px solid black;
border-bottom: 2px solid #CCCCCC;
border-right: 1px solid black;
margin-bottom: 0;
}
#sheet
{
clear : both;
padding-left:20px;
padding-top:20px;
color:red;
}
</style>
</head>
<body>
<div id="main">
<div id="header">
<h1>Tabbed display</h1>
</div>

<div id="tabs">
<ul>
<li class='current'><a href="#">one</a></li>
<li><a href="#">two</a></li>
<li><a href="#">three</a></li>
<li><a href="#">four</a></li>
</ul>
</div>
<div id='sheet'>
<p>Text per sheet goes here</p>

<div id="footer">
<p>Footer text</p>
</div>
</div>
</div>
</body>
</html>
Apr 29 '07 #3
Sjef Janssen wrote:
I try to get a tabbed display work both in IE (6 and 7) and Firefox. The
last does give a problem. What's going wrong here? I'm totally puzzled.

<!doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

Are you sure you want to use XHTML 1.0 Strict?

It doesn't look like XHTML, but I'm assuming it's a work in progress so
I kept it mostly the way it was.

Apr 29 '07 #4

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

Similar topics

8
by: Peter Hoyle | last post by:
I'm trying to generate a tabbed menu system that will wrap to the next line when necessary. I tried using the css shown on this website http://www.sitepoint.com/print/accessible-menu-tabs It...
7
by: Marc | last post by:
Hi everyone. I am having trouble with a stylesheet in mozilla. It is part of turning a list into a menu: #menu li{ margin: 0; display: inline; vertical-align: bottom;
4
by: Martin | last post by:
Hi all! As a preparation of a conversion from VB6 to VB2005 I'm playing around with VB2005. One of the first things that strike me is the user-interface. In all documentation Microsoft keeps...
3
by: Kylie | last post by:
Hi Everyone, I am going to quickly develop a C# application with the paged options dialog type. like Mozilla FireFox Options dialog box or Internet Explorer Tabbed option dialog or ... I have...
4
by: drew197 | last post by:
I am a newbie. I am editing someone elses code to make it compatible with Firefox and Safari. In IE, when you click on the proper link, a block of text is shown in a nice paragraph form. But, in...
21
by: Alan Silver | last post by:
Hello, The latest incarnation of my troubles can be seen at www.kidsinaction/fd3/x.html - both HTML and CSS validate. I have two problems with it... 1) If you view this in FF, quite often the...
2
by: barrymars | last post by:
First posting here so bear with me. i'm working on a double tabbed menu system for a web aplpication, where the first row of 'divs' control visibility of the second row of 'divs'. It all works...
5
eboyjr14
by: eboyjr14 | last post by:
I have Dreamweaver CS3 and I'm trying out the new Spry stuff like the tabbed panels ( and I like it =P ). I am using the tabbed panels and need to know how to dynamically create a new tab with...
19
by: hedges98 | last post by:
Sorry for the mouthful of a title! Basically, I have a form with tabbed controls (Personal/Contact Details, Referral Information, Case Info/Status etc.) and I want to add a tabbed control form...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.