Format von Links ändern

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
cgba
Posts: 112
Joined: Mon Feb 05, 2007 7:11 pm

Format von Links ändern

Post by cgba »

Hallo,

meine Frage hat zwar nicht unbedingt etwas mit phpMyFAQ zu tun, aber ich erlaube mir einfach, sie trotzdem hier zu stellen :-).

Wo in der style.css kann ich das Format der Links ändern? Ich möchte, dass Links orangefarben dargestellt werden und dass Sie beim Drüberfahren mit der Maus statt unterstrichen fett erscheinen.

Wo kann ich die Farbe der Links ändern und was muss ich bei

Code: Select all

}
a:hover {
   text-decoration: underline;
   }
anstatt des underline eintragen, damit der Link fett dargestellt wird? Ich hab auf SelfHTML zwar die Möglichkeiten gefunden, allerdings fehlt da der Parameter für die fette Darstellung. Dass es aber geht, habe ich schon des Öfteren gesehen.
Viele Grüße
Christian
MS Outlook FAQ
Thorsten
Posts: 15565
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

die Farben sind in der colors.css definiert.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
psp-faq
Posts: 46
Joined: Fri Feb 09, 2007 10:02 am
Contact:

Re: Format von Links ändern

Post by psp-faq »

Hi,

damit du deine Links beim überfahren Fett angezeigt werden muss du folgendes ändern...

Code: Select all

}
a:hover {
   font-weight: bold;
   }
und in der Colors.css fügst du folgende Zeile ein...

Code: Select all

a {
	color: #3399FF;
}
Ich weis zwar nicht ob das alles so Konform ist, aber es funtkioniert!

Grüße
Bastian
cgba
Posts: 112
Joined: Mon Feb 05, 2007 7:11 pm

Re: Format von Links ändern

Post by cgba »

Hallo Bastian,

vielen Dank für Deine Antwort.
Bastian wrote: damit du deine Links beim überfahren Fett angezeigt werden muss du folgendes ändern...

Code: Select all

}
a:hover {
   font-weight: bold;
   }
Wunderbar! Vielen Dank! :-)
Bastian wrote: und in der Colors.css fügst du folgende Zeile ein...

Code: Select all

a {
	color: #3399FF;
}
Das funktioniert leider nicht, aber das ist nicht weiter schlimm.
Viele Grüße
Christian
MS Outlook FAQ
psp-faq
Posts: 46
Joined: Fri Feb 09, 2007 10:02 am
Contact:

Re: Format von Links ändern

Post by psp-faq »

cgba wrote: und in der Colors.css fügst du folgende Zeile ein...

Code: Select all

a {
	color: #3399FF;
}
Das funktioniert leider nicht, aber das ist nicht weiter schlimm.
CSS arbeitet eine Datei von oben nach unten ab, deswegen kann es sein, dass wenn du diesen Teil oben in der Datei einfügst und das gleiche Tag "a" weiter unter noch mal neu definierst, wird das obere dann von dem unteren neu überschrieben...

Lange Rede kurzer Sinn, schau mal ob das a-Tag in deiner Colors.css schon mal definiert wurde und ändere die Farbe direkt da.

Grüße
Bastian
cgba
Posts: 112
Joined: Mon Feb 05, 2007 7:11 pm

Re: Format von Links ändern

Post by cgba »

Hallo Bastian,
psp-faq wrote: Lange Rede kurzer Sinn, schau mal ob das a-Tag in deiner Colors.css schon mal definiert wurde und ändere die Farbe direkt da.
Nein, in der Datei gab es das a-Tag noch nicht. Ich habe den Eintrag jetzt mal ans Ende der Datei geschrieben — für den Fall, dass ich Tomaten auf den Augen hatte :-) —, aber die Linkfarbe bleibt trotzdem blau.

Im Folgenden mal der Inhalt der color.css:

Code: Select all

/**
* $Id: colors.css,v 1.1.2.3 2006/01/02 12:47:16 thorstenr Exp $
*
* In this CSS file you'll find all color defintions for phpMyFAQ
*
* @author		Jens Grochtdreis <jens@grochtdreis.de>
* @author		Thorsten Rinne <thorsten@rinne.info>
* @since		2005-03-12
* @copyright	(c) 2005-2006 phpMyFAQ Team
* 
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
* 
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/

/**
* Main body
*/
html, body {
   background: #ffffff;
   color: #000000;
}

/**
* the header with the title
*/
#header {
   background: #0D487A;
   color: #ffffff;
}
#header h1 a {
   color: #E48428;
} 
#header ul a {
   color: #ffffff;
}

/**
* Categories
*/
#categories {
    background-color: #EDF2F2;
    border-color: #D0D9D9;
}
#categories li {
    border-color: #0D487A;
}
#categories li a {
    border-color: #D0D9D9;
    background-color: #EDF2F2;
    color: #000000;
}
#categories li a:hover {
    background-color: #D0D9D9;
    color: #000000;
}

#categories .active {
	background-color: #D0D9D9;
}
#categories .subcat a {
	background-color: #F2ECEC;
}
#categories .subcat .active {
	background-color: #ECF2ED;
} 
/**
* Search box and language selection box
*/
#search, #langform {
   border-color: #D0D9D9;
   background-color: #EDF2F2;
}
#search input, input[type=text] {
   background: #ffffff;
   border-color: #000000;
}
#search input[type=text]:focus {
   background: #f5f5f5;
}

/**
* Top 10 and Latest areticles
*/
#topten h3, #latest h3 {
   border-color: #a9a9a9;
}
#topten ol, #latest ol {
   
}
#topten li, #latest li {
   
}

/**
* Main content
*/
.main-content h2, .main-content h3 {
  color: #000000;
  border-color: #a9a9a9;
}

/**
* Table definitions in the main content column
*/
.main-content table {
   border-color: #a9a9a9;
}
td, th, .main-content td {
   border-color: #a9a9a9;
}
.main-content th {
   border-bottom-color: transparent;
}

/**
* Fieldset definitions in the main content column
*/
.main-content fieldset {
   border-color: #e7e7e7;
}

/**
* Form definitions in the main content column
*/
.main-content form textarea, .main-content form .inputfield {
   color: #333333;
   background-color: #ffffff;
   border-color: #e7e7e7;
   border-top-color: #999999;
   border-left-color: #999999;
}
.main-content form textarea:focus, .main-content form input[type=text]:focus {
   background: #f5f5f5;
}
.main-content form input[type=radio], .main-content form input[type=checkbox] {
   background-color: transparent;
}
select {
   background-color: #ffffff;
   color: inherit;
}

/**
* Submit button definitions
*/
input[type=submit] {
	color: Black;
	background: #EDF2F2;
	border-color: #ffffff;
	border-bottom-color: #dddddd;
	border-right-color: #dddddd;
}

/**
* Highlighted search result
*/
.highlight {
	background-color: #F8F8FF;
	font-weight: bold;
	border: 1px dotted #FF6347;
}

/**
* Footer definitions
*/
#footer {
   color: #666666;
   border-color: #666666;
}
#footer, #footer a, #footer a:visited {
   color: #666666;
}

a {
   color: #3399FF;
}
Viele Grüße
Christian
MS Outlook FAQ
psp-faq
Posts: 46
Joined: Fri Feb 09, 2007 10:02 am
Contact:

Post by psp-faq »

Ok, sorry mein Fehler!
Ich hab nicht gefragt von welchen Links genau du die Farbe geändert haben willst, denn für Tags wie z.B. h1, h2 oder li wird das a-Tag noch mal extra definiert...
Hast du die Seite Online auf der ich sehen könnte welche Links du ändern möchtest bzw. kannst du mir sagen um welche Links genau es sich handelt?

Grüße
Bastian
cgba
Posts: 112
Joined: Mon Feb 05, 2007 7:11 pm

Post by cgba »

Hallo Bastian,

ich will, dass alle Links in Artikeln auf dieser Seite orangefarben dargestellt werden. Nicht aber die Links der Navigationsleiste auf der linken Seite.

Wenn das aber zuviel Aufwand ist, lassen wir das bleiben, denn erstens möchte ich Dir nicht Deine Zeit stehlen und zweitens ist das wirklich nicht so wichtig :-).
Viele Grüße
Christian
MS Outlook FAQ
psp-faq
Posts: 46
Joined: Fri Feb 09, 2007 10:02 am
Contact:

Post by psp-faq »

Code: Select all

/**
* $Id: colors.css,v 1.1.2.3 2006/01/02 12:47:16 thorstenr Exp $
*
* In this CSS file you'll find all color defintions for phpMyFAQ
*
* @author      Jens Grochtdreis <jens@grochtdreis.de>
* @author      Thorsten Rinne <thorsten@rinne.info>
* @since      2005-03-12
* @copyright   (c) 2005-2006 phpMyFAQ Team
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/

/**
* Main body
*/
html, body {
   background: #ffffff;
   color: #000000;
}

/**
* the header with the title
*/
#header {
   background: #0D487A;
   color: #ffffff;
}
#header h1 a {
   color: #E48428;
}
#header ul a {
	color:#FF9900;
   /** Orginale Farbe
   color: #ffffff; */
}

/**
* Categories
*/
#categories {
    background-color: #EDF2F2;
    border-color: #D0D9D9;
}
#categories li {
    border-color: #0D487A;
}
#categories li a {
    border-color: #D0D9D9;
    background-color: #EDF2F2;
	color:#FF9900;
    /** Orginale Farbe
	color: #000000; */
}
#categories li a:hover {
    background-color: #D0D9D9;
	color:#FF9900;
    /** Orginale Farbe
	color: #000000; */
}

#categories .active {
   background-color: #D0D9D9;
}
#categories .subcat a {
   background-color: #F2ECEC;
}
#categories .subcat .active {
   background-color: #ECF2ED;
}
/**
* Search box and language selection box
*/
#search, #langform {
   border-color: #D0D9D9;
   background-color: #EDF2F2;
}
#search input, input[type=text] {
   background: #ffffff;
   border-color: #000000;
}
#search input[type=text]:focus {
   background: #f5f5f5;
}

/**
* Top 10 and Latest areticles
*/
#topten h3, #latest h3 {
   border-color: #a9a9a9;
}
#topten ol, #latest ol {
   
}
#topten li, #latest li {
   
}

/**
* Main content
*/
.main-content h2, .main-content h3 {
  color: #000000;
  border-color: #a9a9a9;
}

/**
* Table definitions in the main content column
*/
.main-content table {
   border-color: #a9a9a9;
}
td, th, .main-content td {
   border-color: #a9a9a9;
}
.main-content th {
   border-bottom-color: transparent;
}

/**
* Fieldset definitions in the main content column
*/
.main-content fieldset {
   border-color: #e7e7e7;
}

/**
* Form definitions in the main content column
*/
.main-content form textarea, .main-content form .inputfield {
   color: #333333;
   background-color: #ffffff;
   border-color: #e7e7e7;
   border-top-color: #999999;
   border-left-color: #999999;
}
.main-content form textarea:focus, .main-content form input[type=text]:focus {
   background: #f5f5f5;
}
.main-content form input[type=radio], .main-content form input[type=checkbox] {
   background-color: transparent;
}
select {
   background-color: #ffffff;
   color: inherit;
}

/**
* Submit button definitions
*/
input[type=submit] {
   color: Black;
   background: #EDF2F2;
   border-color: #ffffff;
   border-bottom-color: #dddddd;
   border-right-color: #dddddd;
}

/**
* Highlighted search result
*/
.highlight {
   background-color: #F8F8FF;
   font-weight: bold;
   border: 1px dotted #FF6347;
}

/**
* Footer definitions
*/
#footer {
   color: #666666;
   border-color: #666666;
}
#footer, #footer a, #footer a:visited {
   color: #666666;
}


Das ist schon in Ordnung, ich habe gerade nicht so viel zu tun :wink:

Jetzt sollten die Links in der Navigtion und auf der Restlichen Seite Orange sein...

Grüße
Bastian
cgba
Posts: 112
Joined: Mon Feb 05, 2007 7:11 pm

Post by cgba »

Hallo Bastian,

da haben wir uns wohl missverstanden :-). Ich wollte eigentlich, dass alle von mir gesetzten Links in Artikeln organgefarben dargestellt werden, nicht aber die der Navigationsleiste. Jetzt ist es genau umgekehrt. Aber: So, wie's jetzt ist, gefällt mir das eh besser, sodass diese Lösung wunderbar ist.

Ich danke Dir recht herzlich für Dein Engagement und wünsche Dir ein schönes Wochenende.
Viele Grüße
Christian
MS Outlook FAQ
Post Reply