|
|||
kann man den code optimieren?
scheiss ie braucht mal wieder einen eigenen hack für eine css narvigation
Code:
html (sitzt in ner templateengine in ner div box noch drin) <ul id="navlist"> <li id="aktiv">link[*]link[*]link[*]link[*]link[/list]css #navlist {width:200px;display:block;padding:0;margin:0; text-align:right;font:bold 12px verdana,helvetica,arial,sans-serif; list-style:none; border-top:1px solid yellow;} #navlist li {list-style:none;padding-right:10px; margin:0px;border:0px;border-top: 1px solid #fff;} #navlist li a {display: block;width: 178px;color:white; padding: 2px 2px 2px 2px;border-right:10px solid yellow;border-left:10px solid #aaaabb;} #navlist li a:link { width:200px;color: #666677; } #navlist li a:hover {width:198px;border:0px;border-color: blue;color: #000;background: #FFB787;} /*linke Narvigation - Hack für IE */ * html #navlist {width:200px;} * html #navlist a {width:200px;margin-right:-10px;margin-left:-20px;} * html #navlist a:hover {width:190px;margin-right:-10px;margin-left:-20px;border-right:10px solid #fff;border-left:10px solid #fff;} der hack ist aber nötig damit es wenigstens in etwa gleich ausschaut |
Sponsored Links |
|
||||
Auch ohne Deine "Hacks" (die teilweise unsinnig sind) wäre es auf dem IE und Firefox gleich darstellbar.
Einige Angaben kannst Du auch komplett weglassen, wie z.B. das display: block bei #navlist - denn UL ist bereits ein Blockelement. Wenn man bei padding, margin oder border Abstände abschalten will, reicht eine 0 - eine Einheit ist da nicht nötig. Auch kannst Du Angaben zusammenfassen, z.B. border: 1px solid #f00; Oder aus: padding: 2px 2px 2px 2px; Reicht: padding: 2px; Gibt noch ne Menge zu optimieren
__________________
“My software never has bugs. It just develops random features ...” » DevShack - die Website des freien Webentwicklers Boris Bojic |
Sponsored Links |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Wie Code effektiv in XHTML ausgeben? | Schelm.isch | (X)HTML | 8 | 30.11.2008 16:17 |
JQuery anfänger fragen ? wie man den code in php einbaut? | kjvision | Javascript & Ajax | 1 | 21.08.2008 18:02 |
CSS Experten Hilfe benötigt! | klappauge | CSS | 10 | 25.11.2007 14:37 |
XHTML und CSS Code auszeichnen | Lloyd Larkin | Barrierefreiheit | 11 | 20.07.2006 08:51 |
xhtml validator error | doni | (X)HTML | 40 | 17.09.2004 06:20 |