473,322 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Multiple Style Sheet Question

Stang02GT
1,208 Expert 1GB
I am running into a problem with a style sheet for my menu and the style sheet on my web page.

The style sheet for the web page is over riding some of the items of my menu sheet.

Is there any way i can stop this and exclude my menu from being styled by the web page sheet?
Jan 28 '08 #1
7 1625
harshmaul
490 Expert 256MB
i guess your styling using html elements

eg...

Expand|Select|Wrap|Line Numbers
  1. ul{
  2. float:left;
  3. }
what you need to do is use classes and IDs

Expand|Select|Wrap|Line Numbers
  1. .myUnorderdList{
  2. float:left;
  3. }
This is only a guess as you haven't included code for me to use to help diagnose.

If this didn't work please include examples
Jan 28 '08 #2
Stang02GT
1,208 Expert 1GB
i apologize here is the code that styles my menu

Expand|Select|Wrap|Line Numbers
  1. .horizontalcssmenu ul{
  2. margin: 0;
  3. padding: 0;
  4. max-width: 200;
  5. list-style-type: none;
  6. }
  7.  
  8. /*Top level list items*/
  9. .horizontalcssmenu ul li{
  10. position: relative;
  11. display: inline;
  12. float: left;
  13. }
  14.  
  15. /*Top level menu link items style*/
  16. .horizontalcssmenu ul li a{
  17. display: block;
  18. width: 90px; /*Width of top level menu link items*/
  19. padding: 2px 8px;
  20. border: 1px solid #202020;
  21. border-left-width: 0;
  22. text-decoration: none;
  23. background: url(untitled.bmp) center center repeat-x;
  24. color: white;
  25. font: bold 10px Tahoma;
  26.  
  27. }
  28.  
  29. /*2nd level menu*/
  30. .horizontalcssmenu ul li ul{
  31. left: 0;
  32. top: 0;
  33. position: absolute;
  34. display: block;
  35. visibility: hidden;
  36. z-index: 100;
  37. }
  38.  
  39. /*2nd level menu list items*/
  40. .horizontalcssmenu ul li ul li{
  41. display: inline;
  42. float: none;
  43. }
  44.  
  45.  
  46. /* 2nd level menu links style */
  47. .horizontalcssmenu ul li ul li a{
  48. width: 130px; /*width of sub menu levels*/
  49. font-weight: normal;
  50. padding: 2px 5px;
  51. background: url(untitled1.bmp) center center repeat-x;
  52. border-width: 0 1px 1px 1px;
  53. }
  54.  
  55. .horizontalcssmenu ul li a:hover{
  56. background: url(untitled1.bmp) center center repeat-x;
  57. }
  58.  
  59. .horizontalcssmenu ul li ul li a:hover{
  60. background: url(untitled2.bmp) center center repeat-x;
  61. }
  62.  
  63. .horizontalcssmenu .arrowdiv{
  64. position: absolute;
  65. right: 0;
  66. background: transparent url(menuarrow.gif) no-repeat center left;
  67. }
  68.  
  69. * html p#iepara{ 
  70. padding-top: 1em;
  71. }
  72.  
  73. /*3rd level menu*/
  74. .horizontalcssmenu ul li ul li ul{
  75. left: 0;
  76. top: 0;
  77. border-top: 0px solid #202020;
  78. position: absolute;
  79. left: 70px; /*this is the offset for the sub sub-menu to allow the sub-menu to be seen*/
  80. display: block;
  81. visibility: hidden;
  82. z-index: inherit;
  83. }
  84.  
  85. /*3rd  menu list items*/
  86. .horizontalcssmenu ul li ul li ul li{
  87. display: inherit;
  88. float: right;
  89. }
  90.  
  91.  
  92. /*3rd  menu links style */
  93. .horizontalcssmenu ul li ul li ul li a{
  94. width:120px; /*width of sub menu levels*/
  95. display:block;
  96. font-weight: normal;
  97. padding: 2px 2px;
  98. background:  url(untitled.bmp) center center repeat-x;
  99. border-width: 0 1px 1px 1px;
  100. }

and here is the code for style sheet for the page that the menu is on

Expand|Select|Wrap|Line Numbers
  1. A:link { color: blue; text-decoration: none }
  2. A:active { color: blue; text-decoration: none }
  3. A:visited { color: red; text-decoration: none }
  4. A:hover { color: #00CCFF; text-decoration: none }
  5. BODY    { font: normal 10pt Trebuchet MS; }
  6. P   { font: normal 10pt Trebuchet MS; }
  7. LI { margin-top: 0px; }
  8. TD  { font: normal 10pt Trebuchet MS; }
  9. .m1,.m2,.m3,.m3a,.m4,.m4a,.m5,.m6,.m7,.m8,.m9,.m10 {font-family: Trebuchet MS;}
  10. .m2,.m4,.m6,.m8,.m10 {font-weight:bold;}
  11. .m1,.m2  {font-size:10pt;}
  12. .m3a,.m4a {font-size:11pt;}
  13. .m3,.m4 {font-size:12pt;}
  14. .m5,.m6 {font-size:14pt;}
  15. .m7,.m8 {font-size:18pt;}
  16. .m9,.m10 {font-size:9pt;}
  17. .p8 {font: normal 8pt Trebuchet MS;}
  18. .p9 {font: normal 9pt Trebuchet MS;}
  19.  
  20.  
  21.  
  22.  
  23. BODY {OVERFLOW:scroll;OVERFLOW-X:auto;}
  24. .DEK {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}
  25.  
Jan 28 '08 #3
Stang02GT
1,208 Expert 1GB
My main problem lies in that the Web Page Css file treats all the menu items with drop downs as VISITED Links and makes them red. I need them to remain white at all times (User Request), but if i change the Web Page style sheet to Visited Links being white it fixes the problem with the menu items, but it creates the issue where all other links that were Visited are now white and unreadable.
Jan 28 '08 #4
harshmaul
490 Expert 256MB
Best guess is that the achor tags are linking back to the same page. Therefore the href is referencing a page already visited.

If you make sure the anchors that are comming up red AREN'T pointing at the current page.

Many people do this while a sites in dev, if this isn't the case please post a link OR the complete code.

Expand|Select|Wrap|Line Numbers
  1. A:link { color: blue; text-decoration: none }
  2. A:active { color: blue; text-decoration: none }
  3. A:visited { color: red; text-decoration: none }
  4. A:hover { color: #00CCFF; text-decoration: none }
Jan 28 '08 #5
Stang02GT
1,208 Expert 1GB
The site is in DEV right now. And the anchor tags are all pointing to different pages, so im not really sure whats going on with it.
Jan 28 '08 #6
I guess it's a CSS specifity problem, but I can't figure it out without the HTML markup. So post it plz.
Jan 28 '08 #7
Stang02GT
1,208 Expert 1GB
I seemed to have fixed the problem, here is what i did that fixed it.


Expand|Select|Wrap|Line Numbers
  1. #navigation A:link { color: blue; text-decoration: none }
  2. #navigation A:active { color: blue; text-decoration: none }
  3. #navigation A:visited { color: red; text-decoration: none }
  4. #navigation A:hover { color: #00CCFF; text-decoration: none }
Jan 28 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Carolyn Marenger | last post by:
Hey everyone, I am looking for your thoughts and opinions. Is it preferable to have one css file containing all the style information or break it up into multiple imported files for different...
33
by: amerar | last post by:
Hi All, I can make a page using a style sheet, no problem there. However, if I make an email and send it out to my list, Yahoo & Hotmail totally ignore the style tags. It looks fine in...
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
2
by: Eero Tuomenoksa | last post by:
Hi Does someone knows how i can show/hide multible divs at one click? -- Käytössä Operan vallankumouksellinen sähköpostiohjelma: http://www.opera.com/mail/
8
by: pamelafluente | last post by:
Hi guys, Is it possible to add "onload" (via Javascript) a new class to the <styleheader section? If yes, how would that be done ? <style type="text/css" media="screen"> .NewStyleClass{...
10
by: pamelafluente | last post by:
Hi, this time I am trying to add a style on the fly.I wish equivalency with this one (only the menuItemStyle line): <head> <style type="text/css" media="screen"> ... some static styles ......
4
by: rodneyystwyth | last post by:
Does anyone know the code to have multiple css sheets on one website? Could you give me the exact code for xhtml to make it work. I have a drop down list with the options of different style sheets...
10
by: Ed Jay | last post by:
I do not want to load two style sheets for screen and print media. I'm having difficulty grasping the use of the @print statement, or its syntax. Would someone please provide a simple explanation....
4
by: fjm | last post by:
Hello everyone. I’d like to know how to handle multiple style sheets. I have css tabs that have a style sheet and then I also have a separate style sheet for the content that goes inside the tab. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.