Connecting Tech Pros Worldwide Forums | Help | Site Map

CSS in ASP page

Newbie
 
Join Date: Nov 2008
Posts: 1
#1: Nov 10 '08
Please help me, this is really bugging since a week.

I have a code that says:

Expand|Select|Wrap|Line Numbers
  1. <DIV CLASS ="SLIDETABS">
  2. <ul id="solutionstabs" class="tabs">                            
  3.                             <li ><a href="#" title="Solution Overviews" rel="solutions1" ><span>Solution Overviews</span></a></li>                            
  4.                             <li ><a href="#" title="Implementation Accelerators"  rel="solutions2" ><span>Implementation Accelerators</span></a></li>                            
  5.                             <li ><a href="#" title="Customer Success Stories" rel="solutions3" ><span>Customer Success Stories</span></a></li>                        
  6.                             </ul></DIV>
If i use the DIV tag class 'slidetabs' the asp apge doesnt pick the styles of this class instead it takes only from the class'tabs.
Both classes are on the same style sheet...please help...

----my style sheet:
Expand|Select|Wrap|Line Numbers
  1. #slidetabsmenu {
  2. float:left;
  3. width:100%;
  4. margin-left: 0;
  5.  
  6. line-height:25px;
  7. border-bottom: 0px solid gray;
  8. font: bold 12px Verdana;
  9. }
  10.  
  11. * html #slidetabsmenu{ /*IE only. Add 1em spacing between menu and rest of content*/
  12. margin-bottom: 0em;
  13. }
  14.  
  15. #slidetabsmenu ul{
  16. float:left;
  17. list-style-type: none;
  18. margin:0;
  19. margin-left: 0px;
  20. padding:0;
  21. }
  22.  
  23. #slidetabsmenu li{
  24. float:left;
  25. display:inline;
  26. margin:0;
  27. padding:0;
  28. }
  29.  
  30.  
  31. #slidetabsmenu a {
  32. float:left;
  33. background:url(images/tab-left.gif) no-repeat left top;
  34. margin:0;
  35. padding:0 0 0 9px;
  36. text-decoration:none;
  37. }
  38.  
  39. #slidetabsmenu a span {
  40. float:left;
  41. display:block;
  42. background:url(images/tab-right.gif) no-repeat right top;
  43. padding:3px 14px 3px 5px;
  44. font-weight:bold;
  45. color:#3B3B3B;
  46. }
  47.  
  48. /* Commented Backslash Hack hides rule from IE5-Mac \*/
  49. #slidetabsmenu a span {float:none;}
  50. /* End IE5-Mac hack */
  51.  
  52. #slidetabsmenu a:hover span {
  53. color: black;
  54. }
  55.  
  56. #slidetabsmenu #current a {
  57. background-position:0 -125px;
  58. }
  59.  
  60. #slidetabsmenu #current a span {
  61. background-position:100% -125px;
  62. color: red;
  63. }
  64.  
  65. #slidetabsmenu a:hover {
  66. background-position:0% -125px;
  67. }
  68.  
  69. #slidetabsmenu a:hover span {
  70. background-position:100% -125px;
  71. }
  72. /* ######### CSS for metashade Tabs. Remove if not using ######### */
  73.  
  74. .tabs{
  75. /*padding: 3px 0;*/
  76. margin-left: 0;
  77. margin-top: 0;
  78. margin-bottom: 0;
  79. list-style-type: none;
  80. text-align: left;
  81. font-size:12px;
  82. width:100%;
  83. line-height:25px;
  84.  
  85. }
  86.  
  87. .tabs li{
  88. float:left;
  89. margin-bottom: 0;
  90. padding: 0;
  91. margin-left: 0px;
  92. display:inline;
  93. text-align: left;
  94. line-height:25px;
  95. }
  96. .tabs ul{
  97. float:left;
  98. list-style-type: none;
  99. margin:0;
  100. margin-left: 0px;
  101. padding:0;
  102. text-align: left;
  103. line-height:25px;
  104.  
  105. }
  106.  
  107. .tabs li a{
  108. float:left;
  109. text-decoration: none;
  110. margin-bottom: 0;
  111. padding:3px 14px 3px 5px;
  112. font:bold;
  113. text-align: left;
  114. color: #2d2b2b;
  115. background:url(images/tab-right.gif) no-repeat right top;
  116. border-bottom-color: white;
  117. line-height:25px;
  118. }
  119.  
  120. .tabs li a:visited{
  121. color: #2d2b2b;
  122. text-align: left;
  123. }
  124.  
  125. .tabs li a:hover{
  126. float:left;
  127. text-decoration: none;
  128. background:white;
  129. }
  130.  
  131. .tabs li a.selected{ /*selected main tab style */
  132. float:left;
  133.  
  134. border-bottom-color: white;
  135. background:white ;
  136. text-align: left;
  137. }
  138.  
  139. .tabs li a.selected:hover{ /*selected main tab style */
  140. text-decoration: none;
  141. }
  142.  
  143. .tabcontent{
  144. display:none;
  145. }
  146.  
  147. @media print {
  148. .tabcontent {
  149. display:block !important;
  150. }
  151. }
  152.  
  153. /* ######### CSS for Inverted Modern Bricks II Tabs. Remove if not using ######### */
  154.  
  155. .modernbricksmenu2{
  156. padding: 0;
  157. width: 362px;
  158. border-top: 5px solid #D25A0B; /*Brown color theme*/ 
  159. background: transparent;
  160. voice-family: "\"}\"";
  161. voice-family: inherit;
  162. }
  163.  
  164. .modernbricksmenu2 ul{
  165. margin:0;
  166. margin-left: 10px; /*margin between first menu item and left browser edge*/
  167. padding: 0;
  168. list-style: none;
  169. }
  170.  
  171. .modernbricksmenu2 li{
  172. display: inline;
  173. margin: 0 2px 0 0;
  174. padding: 0;
  175. text-transform:uppercase;
  176. }
  177.  
  178. .modernbricksmenu2 a{
  179. float: left;
  180. display: block;
  181. font: bold 11px Arial;
  182. color: white;
  183. text-decoration: none;
  184. margin: 0 1px 0 0; /*Margin between each menu item*/
  185. padding: 5px 10px;
  186. background-color: black; /*Brown color theme*/ 
  187. border-top: 1px solid white;
  188. }
  189.  
  190. .modernbricksmenu2 a:hover{
  191. background-color: #D25A0B; /*Brown color theme*/ 
  192. color: white;
  193. }
  194.  
  195. .modernbricksmenu2 a.selected{ /*currently selected tab*/
  196. background-color: #D25A0B; /*Brown color theme*/ 
  197. color: white;
  198. border-color: #D25A0B; /*Brown color theme*/ 
  199. }
  200.  
  201. .tabcontent{
  202. display:none;
  203. }
  204.  
  205. @media print {
  206. .tabcontent {
  207. display:block !important;
  208. }
  209. }
  210.  
  211. /* ######### CSS for Indented CSS Tabs. Remove if not using ######### */
  212.  
  213.  
  214. .indentmenu{
  215. font: bold 13px Arial;
  216. width: 100%; /*leave this value as is in most cases*/
  217. }
  218.  
  219. .indentmenu ul{
  220. margin: 0;
  221. padding: 0;
  222. float: left;
  223. /* width: 80%; width of menu*/
  224. border-top: 1px solid navy; /*navy border*/
  225. background: black url(indentbg.gif) center center repeat-x;
  226. }
  227.  
  228. .indentmenu ul li{
  229. display: inline;
  230. }
  231.  
  232. .indentmenu ul li a{
  233. float: left;
  234. color: white; /*text color*/
  235. padding: 5px 11px;
  236. text-decoration: none;
  237. border-right: 1px solid navy; /*navy divider between menu items*/
  238. }
  239.  
  240. .indentmenu ul li a:visited{
  241. color: white;
  242. }
  243.  
  244. .indentmenu ul li a.selected{
  245. color: white !important;
  246. padding-top: 6px; /*shift text down 1px*/
  247. padding-bottom: 4px;
  248. background: black url(indentbg2.gif) center center repeat-x;
  249. }
  250.  
  251.  
  252. .tabcontentstyle{ /*style of tab content oontainer*/
  253. border: 1px solid gray;
  254. width: 450px;
  255. margin-bottom: 1em;
  256. padding: 10px;
  257. }
  258.  
  259. .tabcontent{
  260. display:none;
  261. }
  262.  
  263. @media print {
  264. .tabcontent {
  265. display:block !important;
  266. }
  267. }

DrBunchman's Avatar
Moderator
 
Join Date: Jan 2008
Location: Winchester, UK
Posts: 930
#2: Nov 11 '08

re: CSS in ASP page


Hi Sushmitha,

Welcome to Bytes.com! I hope you find the site useful.

Please don't forget to wrap your code in CODE tags - it makes your posts much easier to read - and please read the Posting Guidelines if you have not done so already.

I don't see a class called SLIDETABS in your style sheet but I do see one called tabs - could this be the problem?

Also please note that for strict XHTML document types class and id names can be case sensitive to I would avoid naming them in upper case just to keep things simple.

Dr B
Reply