Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Nielada zagadka?
Forum PHP.pl > Forum > Po stronie przeglądarki > CSS
code46
Mam nietypowy problem. Dotyczy on CSS.
Mam 2 pliki:

menu.css
  1. body { color: #A14A00;
  2. background-color: #D9A300;
  3. }
  4.  
  5. a:link {
  6. color: #0000cc;
  7. text-decoration: none;
  8. }
  9.  
  10.  
  11. a:visited {
  12. color: #0000cc;
  13. text-decoration: none;
  14. }
  15.  
  16. a:hover {
  17. color: #8E2323;
  18. text-decoration: underline;
  19. }
  20.  
  21.  
  22.  
  23. .user { font-family: "Times New Roman", Times, sans-serif;
  24. background-color: #376203;
  25. color: #FFFFFF;
  26. text-align: center;
  27. font-size: 12pt;
  28. }
  29.  
  30. .menu { font-family: "Times New Roman", Times, sans-serif;
  31. background-color: #2E6999;
  32. color: #FFFFFF;
  33. text-align: center;
  34. font-size: 10pt;
  35. }
  36.  
  37. .wiz { color: #A14A00;
  38. background-color: #E3AE00;
  39. }
  40.  
  41.  
  42. .wiz1 {background-color: #E3AE00;
  43. color: #2100A0;
  44. font-size: 12pt;
  45. }
  46.  
  47. .wiz2 {background-color: #E3AE00;
  48. color: #87009A;
  49. font-size: 12pt;
  50. }


roboczy.css
  1. body { color: #3232CD;
  2. background-color: #DBDBDB;
  3. }
  4.  
  5. a:link {
  6. color: #0000cc;
  7. text-decoration: none;
  8. }
  9.  
  10.  
  11. a:visited {
  12. color: #0000cc;
  13. text-decoration: none;
  14. }
  15.  
  16. a:hover {
  17. color: #8E2323;
  18. text-decoration: underline;
  19. }
  20.  
  21.  
  22. h2 { font-family: "Times New Roman", Times, sans-serif;
  23. color: #3232CD;
  24. text-align: center;
  25. font-size: 20pt;
  26. }
  27.  
  28.  
  29. td.tdbkground {background-color: #CFB53B;
  30. color: #238E23;
  31. font-family: Verdana, Helvetica, Arial, sans-serif;
  32. font-size: 10pt;
  33. text-align: left;
  34. }
  35.  
  36. .reg {background-color: #CFB53B;
  37. color: #FF24OO;
  38. font-family: Verdana, Helvetica, Arial, sans-serif;
  39. font-size: 12pt;
  40. text-align: center;
  41. }
  42.  
  43.  
  44. .error {background-color: #CFB53B;
  45. color: #ff0033;
  46. font-family: Verdana, "Times New Roman", Times, sans-serif;
  47. font-size: 12pt;
  48. text-align: center;
  49. }
  50.  
  51. .zwykly { font-family: Verdana, Helvetica, Arial, sans-serif;
  52. font-size: 10pt;
  53. text-align: left;
  54. }


Część odpowiedzialna za niebieskie linki bez podkreślenia i brązowe z podkreśleniem po najechaniu myszką, w obu plikach są takie same.
Problem w tym, że jak korzystam z menu.css to linki są takie jak chcę, a jak korzystam z roboczy.css to linki są standardowe.
Udało mi się ten problem rozwiązać, zamieniając kolor tła w body na taki z menu.css. Ale znowu jest coś nie tak.

Jeśli widzicie gdzieś błąd to prosze o pomoc smile.gif
wallie
Bo masz takie same nazwy linków zrób moze tak:
Styl menu.css
Kod
body { color: #A14A00;
background-color: #D9A300;
}

a:link {
color: #0000cc;
text-decoration: none;
}


a:visited {
color: #0000cc;
text-decoration: none;
}

a:hover {
color: #8E2323;
text-decoration: underline;
}



.user { font-family: "Times New Roman", Times, sans-serif;
background-color: #376203;
color: #FFFFFF;
text-align: center;
font-size: 12pt;
}

.menu { font-family: "Times New Roman", Times, sans-serif;
background-color: #2E6999;
color: #FFFFFF;
text-align: center;
font-size: 10pt;
}

.wiz { color: #A14A00;
background-color: #E3AE00;
}


.wiz1 {background-color: #E3AE00;
color: #2100A0;
font-size: 12pt;
}

.wiz2 {background-color: #E3AE00;
color: #87009A;
font-size: 12pt;
}

A plik roboczy.css
Kod
body { color: #3232CD;
background-color: #DBDBDB;
}

a.klasa:link {
color: #0000cc;
text-decoration: none;
}


a.klasa:visited {
color: #0000cc;
text-decoration: none;
}

a.klasa:hover {
color: #8E2323;
text-decoration: underline;
}


h2 { font-family: "Times New Roman", Times, sans-serif;
color: #3232CD;
text-align: center;
font-size: 20pt;
}


td.tdbkground {background-color: #CFB53B;
color: #238E23;
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 10pt;
text-align: left;
}

.reg {background-color: #CFB53B;
color: #FF24OO;
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 12pt;
text-align: center;
}


.error {background-color: #CFB53B;
color: #ff0033;
font-family: Verdana, "Times New Roman", Times, sans-serif;
font-size: 12pt;
text-align: center;
}

.zwykly { font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 10pt;
text-align: left;
}
code46
Nie. To źle tu miałem. Miałem 2 różne pliki. Problem leżał w wyczyszczeniu pamięci podręcznej przeglądarki. Cociaż w dokumentach stosuję
  1. <meta name="pragma" content="no-cache" />
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.