css tabs formation problem

Reply

Join Date: Apr 2005
Posts: 149
Reputation: marjan_m is an unknown quantity at this point 
Solved Threads: 0
marjan_m marjan_m is offline Offline
Junior Poster

css tabs formation problem

 
0
  #1
Jun 11th, 2009
Hi,

I am trying to create tabs using two images, the main background image and then the mouse over image, code i hv written after reading guidelines from a book so thats why cant completly understand where is the problem:

css code:

  1. body {
  2. font: 62.5%/1.5 Verdana, Arial, Helvetica, sans-serif;
  3. background-color:#E5E5E5;
  4. }
  5.  
  6. #content {
  7. border-top: 1px solid #898989;
  8. border-right: 1px solid #898989;
  9. border-bottom: 1px solid #898989;
  10. border-left: 1px solid #898989;
  11. }
  12.  
  13. #navContainer {
  14.  
  15. font: 1.1em Arial, Helvetica, sans-serif;
  16. text-align: center;
  17. padding: 20px 0 0;
  18. }
  19.  
  20. #navigation
  21. {
  22. padding:0px;
  23. }
  24.  
  25. #navigation a:link {
  26. text-transform: uppercase;
  27. text-decoration: none;
  28. padding: 5px 10px;
  29. position: relative;
  30. margin-right: 5px;
  31. }
  32.  
  33. #navigation a:visited {
  34. text-transform: uppercase;
  35. text-decoration: none;
  36. padding: 5px 10px;
  37. position: relative;
  38.  
  39. }
  40.  
  41. #navigation #contactDetailsPageLink a:link, #navigation
  42. #contactDetailsPageLink a:visited {
  43. margin-right: 0;
  44. }
  45. <!-- to change font color of links-->
  46. #navigation a:visited {
  47. color:#CCCCCC;
  48.  
  49.  
  50. }
  51. #navigation a:hover {
  52. background-image:url(tab-hover.JPG);
  53. color:#FFFFFF;
  54. }
  55.  
  56.  
  57. #navigation ul {
  58. list-style: none;
  59. margin-bottom:5px;
  60.  
  61. }
  62.  
  63. #navigation li {
  64. display: inline;
  65. padding: 0px 9px;
  66. background-image:url(main_tab.JPG);
  67. }
  68.  
  69. #navigation a:active {
  70. color:#FFFFFF;
  71. }
  72.  
  73. #wrapper {
  74. margin-top:0px;
  75. margin-left:95px;
  76. }
  77. </style>

Html code is:

  1.  
  2. <body id="homepage">
  3.  
  4. <div id="navContainer">
  5. <div id="navigation">
  6. <ul>
  7. <li id="pro"><a href="#" onClick="chk('pro')">Provinces</a></li>
  8.  
  9. <li id="loc"><a href="#" onClick="chk('loc')">Locations</a></li>
  10.  
  11. <li id="slide"><a href="#" onClick="chk('slideshow')">Slide Show</a> </li>
  12.  
  13. <li id="users"><a href="#" onClick="chk('users'">Users</a></li>
  14. </ul>
  15. </div>
  16. </div>
  17.  
  18.  
  19. <div id="wrapper">
  20. <iframe height="1000" width="800" id="content" scrolling="no" frameborder="0">
  21. </iframe>
  22. </div>
  23. </body>

I have attached the two images also. First the problem is that there should not be any space between the tabs, and secondly the tab-hover image is not accurate.

Please guide
Thanks
Attached Thumbnails
main_tab.JPG   tab-hover.JPG  
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 20
Reputation: drumichael87 is an unknown quantity at this point 
Solved Threads: 0
drumichael87 drumichael87 is offline Offline
Newbie Poster

Re: css tabs formation problem

 
0
  #2
Jun 12th, 2009
#navigation li { has right padding set. there's your space. It would be better if we could see the page in action.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 302
Reputation: sreein1986 is an unknown quantity at this point 
Solved Threads: 33
sreein1986's Avatar
sreein1986 sreein1986 is offline Offline
Posting Whiz

Re: css tabs formation problem

 
0
  #3
Jun 13th, 2009
take the padding total to 0 pixel
Thanx,
Shiriyal

http://shiriyal.blogspot.com/
if you problem solved add me as a reputation and mark it mark as solved
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC