CSS

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentCSS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old September 8th, 2010, 04:51 AM
codemolecule codemolecule is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Sep 2010
Posts: 1 codemolecule User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 42 sec
Reputation Power: 0
Problem with css tabs not displaying well

Hello,

I'm a beginner in css and I wanted to make some css tabs with images each tab has a left corner image central text image and right corner image arranged in 3 divs with absolute positioning.
then I write these with a loop with asp to create many tabs each next to the other but instead the tabs seem to appear more stacked above each other.

Any help would be appreciated.

The styles and code:

#everything {
padding: 0px;
margin: 5px;
height: 100%;
min-height: 800px;
width: 975px;
}

#navTabs {
margin: 0px;
width: 100%;
background: url("top.png") no-repeat top;
height: 132px;
vertical-align: top;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
}


.tabl {
position: absolute;
height: 132px;
width: 33px;
left: 0px;
top: 0px;
display:inline;
}

.tabr {
position: absolute;
height: 132px;
width: 26px;
right: 0px;
top: 0px;
display:inline;
}


.tabon, .taboff {
position: relative;
height: 132px;
cursor: hand;
display: inline;
}

.tabon {
background-image: url("on_m.png");
}

.taboff {
background-image: url("off_m.png");
}

.tabItem {
position:absolute;
height: 132px;
left: 33px;
top: 40px;
display: inline;
}

#actionPanel {
width: 100%;
height: 70%;
padding: 10px;

background: url("mid.png");
background-repeat: repeat-y;
}

#btm {
height: 57px;
background: url("bottom.png");
}
</style>


</head>

<body>

<%
dim arTabs( 5 )
arTabs( 0 ) = "home"
arTabs( 1 ) = "events"
arTabs( 2 ) = "news"
arTabs( 3 ) = "photos"
arTabs( 4 ) = "users"
arTabs( 5 ) = "admin"
%>

<div id="everything">
<div id="navTabs">

<%
dim theClass, thisPage

thisPage = Request.ServerVariables("SCRIPT_NAME")
thisPage = replace( right( thisPage, len( thisPage ) - inStrRev( thisPage, "/" ) ), ".asp", "" )

for i = 0 to uBound(arTabs)

if thisPage = arTabs(i) or left( thisPage, len( arTabs(i) ) ) = arTabs(i) then
theClass = "on"
else
theClass = "off"
end if

response.Write("<div class=""tab" & theClass & """ onclick=""javascript:window.location='" & arTabs(i) & ".asp'"">")

Response.Write("<div class=""tabl""><img src=""" & theClass & "_l.png"" /></div>")

Response.Write("<div class=""tabItem""><img src=""" & arTabs(i) & ".png"" align=""absmiddle"" />")

Response.Write("</div>")

Response.Write("<div class=""tabr""><img src=""" & theClass & "_r.png"" /></div></div>")
next
%>

</div>

<div id="actionPanel">admin</div>
<div id="btm"></div>
</div>

Reply With Quote
  #2  
Old September 8th, 2010, 08:55 AM
Squibbit's Avatar
Squibbit Squibbit is offline
Board Geriatric
Tutorialized Novice (500 - 999 posts)
 
Join Date: Sep 2006
Location: Germany
Posts: 887 Squibbit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 16 h 40 m 26 sec
Reputation Power: 0
Change your display value to block (display:block;), and add a float:right; property beneath it.

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentCSS > Problem with css tabs not displaying well


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap