RSS Forums RSS
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 2720 | Replies: 2
Reply
Join Date: Oct 2006
Posts: 24
Reputation: vexhawk is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
vexhawk vexhawk is offline Offline
Newbie Poster

CSS Tab menu

  #1  
Apr 27th, 2007
I was just wondering if anyone knew how to fix the UL and LI hierarchy problem in css with tabmenus.

I wanted the border under my featured tab to disappear but it doesnt work well in IE.

Please have a look; if you look at this code in Firefox it should show the first tab as being white without the black border on the bottom of it. In IE the black border is there because the UL border overwrote the LI border.

Does anyone know a work around?

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>Untitled Document</title>
  5. <link rel="stylesheet" type="text/css" href="assets/style.css" />
  6. <style type="text/css">
  7. /* START TAB MENU */
  8. ul
  9. {
  10. margin: 0;
  11. padding: 0;
  12. list-style: none;
  13. font-size: 14px;
  14. border-bottom: 1px solid #808080;
  15. height: 21px !important;
  16. height: 20px;
  17. }
  18. li
  19. {
  20. float: left;
  21. margin-right: 10px;
  22. border: 1px solid #808080;
  23. border-bottom: none;
  24. }
  25. li a
  26. {
  27. background-color: #f2f3f5;
  28. color: #808080;
  29. padding: 2px 10px 3px 10px;
  30. display: block;
  31. text-decoration: underline;
  32. font: 12px arial;
  33. }
  34. body .featured
  35. {
  36. background-color: #ffffff;
  37. color: #000000;
  38. border-bottom: 1px solid #ffffff;
  39. text-decoration: none;
  40. font-weight: bold;
  41. }
  42. /* END TAB MENU */
  43. </style>
  44. </head>
  45. <body>
  46.  
  47. <ul>
  48. <li>
  49. <a href="#" class="featured">Create User</a></li>
  50. <li>
  51. <a href="#">Edit User</a></li>
  52. <li>
  53. <a href="#">View All Users</a></li>
  54. <li>
  55. <a href="#">Reports</a></li>
  56. <li>
  57. <a href="#">Log Out</a>
  58. </li>
  59. </ul>
  60. </body>
  61. </html>
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2005
Location: Nebraska, U.S.
Posts: 191
Reputation: stupidenator is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
stupidenator's Avatar
stupidenator stupidenator is offline Offline
Junior Poster

Re: CSS Tab menu

  #2  
Apr 27th, 2007
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="assets/style.css" />
<style type="text/css">
/* START TAB MENU */
ul
{
 margin: 0;
 padding: 0;
 list-style: none;
 font-size: 14px;
 border-bottom: 1px solid #808080;
 height: 21px !important;
 height: 20px;
}
li
{
 float: left;
 margin-right: 10px;
 border: 1px solid #808080;
 border-bottom: none;
}
li a
{
 background-color: #f2f3f5;
 color: #808080;
 padding: 2px 10px 3px 10px;
 display: block;
 text-decoration: underline;
 font: 12px arial;
}
.featured
{
 background-color: #ffffff;
 color: #000000;
 border-bottom: 1px solid #ff0000;
 text-decoration: none;
 font-weight: bold;
}
/*  END TAB MENU */
</style>
</head>
<body>
 
<ul>
      <li>
       <a href="#" class="featured">Create User</a></li>
      <li>
       <a href="#">Edit User</a></li>
      <li>
       <a href="#">View All Users</a></li>
      <li>
       <a href="#">Reports</a></li>
      <li>
       <a href="#">Log Out</a>
      </li>
</ul>
</body>
</html>

It looks like in Firefox, the bottom border for the ul is aligned with the bottom border for the anchor, but in IE, the border for the anchor is just slightly above the border for the ul.
Reply With Quote  
Join Date: Oct 2006
Posts: 24
Reputation: vexhawk is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
vexhawk vexhawk is offline Offline
Newbie Poster

Re: CSS Tab menu

  #3  
Apr 27th, 2007
I think what is happening in firefox is that the borders are collapsing and the LI is overlapping the UL border. (i already tried the border-collapse property for IE)

In IE, the border is NOT collapsing. isntead the white LI border sits on top of the UL border.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:11 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC