473,946 Members | 8,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

tabs using CSS

Folks,
I'm trying to implement a tabbed effect with CSS and HTML - no
graphics.
for some reason, i'm unable to control the width of the tabs. I've
pasted the code below.
Any help / pointers to resources that explain how to implement tabs
with CSS would be great.
Thanks,
LP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"

/>
<title>Untitl ed Document</title>
<style>
..box1{
display:inline;
z-index:1;
width:2em;
position:relati ve;
white-space:nowrap;
border-left: solid #000000 1px;
border-right: solid #000000 1px;
border-top: solid #000000 1px;
border-bottom: solid #FFFFFF 1px;
text-align:center
bottom: -1px;
padding-left: 2px;

}
..box4{
position: relative;
background-color: none;
width: 5em;
border:none;
border-bottom: solid #000000 1px;
float: left;
z-index:1;
text-align: right;

}
..box5{
width: 3px;
border: none;
float: left;
display:inline;
z-index:1;
}
..box6{
position:relati ve;
width:100%;
z-index: -2;
border: solid #000000 1px;
height: 100px;
top: -1px;
}
</style>
</head>
<body>
<div class="box4">
<li class="box1">te st</li>
</div>
<div class="box5"></div>
<div class="box4">

<li class="box1">te st2</li>
</div>
<div class="box5"></div>
<div class="box4">
<li class="box1">te st3</li>
</div>
<div class="box6"></div>
</body>
</html>

Jan 27 '06
21 2724
Ian McCarthy <idm.plusnetng@ cronkshawFULLST OPnospanDOTcom> wrote:
Valid != correct.

Markup should describe the semantics and structure of a document. Div
and span are non semantic elements and for most purposes non structural.
They should only be used in addition to semantic or structural elements
for the purpose of styling when no naturally occurring semantic or
structural element is available to bind the styling to (*).

(*) The only exception to this rule is using these elements for
supplying language information.
Could you please explain, to this novice, where the W3C give the sort of
guidance, as you have stated above, or is it your interpretation of the
standard?


W3C create and publish recommendations that for all intended purposes
function as standards. They don't typically publish guidelines or
tutorials on good authoring practices. What I wrote cannot be found in
W3C literature, nor is it an interpretation of the standard since W3C
standards don't concern themselves with application beyond basic
syntactical rules.
It would be useful to be able to have such explanations
available when reading the W3C specs, which in the main say what not
why,


Good authoring practices can be learned in a systematic and
comprehensive way with a good book or tutorial. For individual issues
this comp.infosystem s.www.authoring.* usenet hierarchy should provide
ample guidance.

--
Spartanicus
Feb 5 '06 #21
tsreedevi
2 New Member
i am trying to craete the css tabs

css code


.navigation a
{
color: #000;
background: #fb0 url("../images/left-tab.gif") left top no-repeat;
text-decoration: none;
padding-left: 10px ;
font-weight:bold;
}

.navigation a span
{
background: url("../images/right-tab.gif") right top no-repeat;
padding-right: 10px
}
/*
.navigation a:link, .navigation a:visited, .navigation a:active
{color: #fff; background: #bbb uurl("../images/left-tab.gif") left top no-repeat; font-weight:bold; padding-left: 10px}
.navigation a:link span, .navigation a:visited span, .navigation a:active span
{background: #bbb ("../images/right-tab.gif") right top no-repeat; padding-right: 10px}
*/
.navigation a, .navigation a span
{
display: block;
float: left
}

.navigation a, .navigation a span
{
float: none
}

.navigation a:hover
{
color:#F5FFFA;
background: #26a url("../images/left-tab-hover.gif") left top no-repeat;
text-decoration: none;
padding-left: 10px
}

.navigation a:hover span
{
background: url("../images/right-tab-hover.gif") right top no-repeat;
padding-right: 10px
}

.navigation, .navigation ul
{
list-style: none;
padding: 0;
margin: 0
}

.navigation li
{
float: left;
display: block;
margin: 0;
padding: 0
}

and in jsp file i am using as

<h:panelGrid columns="2" styleClass="nav igation">
<ul>
<h:column>
<li><h:commandL ink action="edit100 3">
<span><h:output Text value="#{msgs.e dit1003}" styleClass="mai ntabtext"/></span>
</h:commandLink>
</li>
</h:column>
<h:column>

<li> <h:commandLin k action="aboutus ">
<span> <h:outputText value="#{msgs.a boutus}" styleClass="mai ntabtext"/></span>
</h:commandLink>
</li>
</h:column>
</ul>
</h:panelGrid>


some one please let me know how to highlight the current page do i need to use any javascript if so can some send me code snippet it would be greatful

thansk in advance.
sreedevi
Feb 16 '06 #22

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

Similar topics

1
3443
by: Dan Jacobson | last post by:
In wdg-html-reference/html40/block/pre.html there is no mention about how ASCII tabs (^I) are to be rendered. I suppose all bets are off? Wait, my docs go thru html-tidy first, and it says tab-size: number Sets the number of columns between successive tab stops. The default is 4. It is used to map tabs to spaces when reading files. Tidy never outputs files with tabs. However, in emacs, tab-width's value is 8. Solution:
2
1524
by: Cat | last post by:
Some nice man told me that I can keep tabs in Visual Studio 2005. (Options -> All Languages -> Tabs -> Keep tabs) But I'm using VC#.NET 2005 EXPRESS EDITION, and I can't find Tabs node. Is it impossible to keep tabs in VC#.NET 2005 EXPRESS EDITION? If there is a way please let me know. Thanks.
2
1306
by: Jim Hubbard | last post by:
I need an example of tabs usage like you might do in a tabbed browser application. I need to be able to open one or more tabs with customer data. Every tab is laid out exactly alike, only the customer data changes from tab to tab. Tabs should be able to be created at the front of all tabs, back of all tabs or between any 2 tabs. Double-clicking a tab should delete it. Double-clicking on the tab control (but NOT on a tab) should create...
10
5129
by: John M. Gabriele | last post by:
The following short program fails: ----------------------- code ------------------------ #!/usr/bin/python class Parent( object ): def __init__( self ): self.x = 9 print "Inside Parent.__init__()"
135
7635
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about which is better. It has become what's known as “religious war” — a heated fight over trivia. In this essay, i like to explain what is the situation behind it, and which is proper.
6
1789
by: Stephen Edwards | last post by:
I am a novice, so bear with me. I designed a website using CSS TABS, all was fine, then I copy and pasted meta name, etc for keywords, tweaking it where necessary for keywords. I did not notice any problems until I looked at the site and although the text for the tabs was showing up the images which make up the tabs weren't. I have no idea why this has happened, can I have some advice as to what to check, and how to fix it, thank...
35
2766
by: Ben | last post by:
Hi, I have a python script on a unix system that runs fine. I have a python script on a windows system that runs fine. Both use tabs to indent sections of the code. I now want to run them on the same system, actually in the same script by combining bits and pieces. But whatever I try my windows tabs get converted to spaces when I transfer it to the unix system and the interpreter complains that the indentation style is not consistent...
7
3769
by: Phil Reynolds | last post by:
I'm using a tab control in Access 2000, and the user requested to have buttons in the form header, instead of the built-in tabs (so that when they scroll down, they can still switch tabs). Now, this works fine. However, when I'm in Design View, I can't access the tabs without changing the tab control's Style back to Tabs. But I want to be able to place controls in that space at the top where the tabs used to be. But if I need to turn the...
7
3055
by: Andrew Poulos | last post by:
Is there a way for javascript to know if a browser has been set to open new windows in tabs? I'm trying to fix some code that allows a user to close a window that javascript opened and it seems to get confused what window to close when a new tab is opened. (The user clicks a link in the opened window which which opens a new window and close the current one.) Andrew Poulos
0
9981
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11566
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11338
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10688
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9886
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7426
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6331
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4533
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3541
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.