Ga naar inhoud

probleem met css


anoniem

Aanbevolen berichten

hallo ik heb een menu gemaakt met een afbeelding ervoor. echter dit menu is alleen zichtbaar in IE en niet in firefox. ik kan de fout in mn code nergens vinden. iemand een idee? [code:1:7db1294184] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title> ... </title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <style type="text/css" media="all">@import "uca_styles.css";</style> </head> <body> <div id="wrap"> <div id="header"> <h2>kopje</h2> <div id="topnav"> <ul> <li id="m_contact" title="keuzeoptie contact"><a href="#">Contact</a></li> <li id="m_help" title="keuzeoptie help"><a href="#">Help</a></li> <li id="m_tools" title="keuzeoptie tools"><a href="#">Tools</a></li> </ul> </div> </div> <ul id="nav"> <li id="m_invoer" title="keuzeoptie invoer"><a href="#" class="selected">Invoer</a></li> <li id="m_bereken" title="keuzeoptie bereken"><a href="#">Bereken</a></li> <li id="m_aanvragen" title="keuzeoptie aanvragen"><a href="#">Aanvragen</a></li> </ul> <div id="content"> nfgnbfnfhn </div> </div> </body> </html> [/code:1:7db1294184] en de css : [code:1:7db1294184] body { background: url(images/bground.gif) repeat-y 50% 0; margin: 0; padding: 0; } /* -- lay-out -- */ #wrap { margin: 0 auto; width: 750px; } #header { background: url(images/header.gif) no-repeat; width: 750px; height: 122px; margin: 0; padding: 0; } h2 { font: italic 15px Arial, Verdana, Helvetica, sans-serif; margin: 0; padding: 15px 0px 0px 35px; float: left; } /* -- top navigatie -- */ #topnav { margin: 15px 0 0 0; padding: 0; height: 16px; list-style: none; display: inline; overflow: hidden; float: right; } #topnav li { margin: 0; padding: 0; color: #000; list-style: none; display: inline; } #topnav a { float: left; padding: 16px 10px 0 0; overflow: hidden; height: 0px; } #topnav a:link, #topnav a:hover, #topnav a:active, #topnav a.selected{ background-position: 0 0px; } #m_contact a { width: 67px; background: url(images/m_contact.gif) top left no-repeat; margin: 0px 7px 0px 0px; border-right: 1px dotted #000; } #m_help a { width: 46px; background: url(images/m_help.gif) top left no-repeat; margin: 0px 7px 0px 0px; border-right: 1px dotted #000; } #m_tools a { width: 52px; background: url(images/m_tools.gif) top left no-repeat; margin: 0px 7px 0px 0px; }[/code:1:7db1294184] alvast dank voor jullie hulp. Lex
Link naar reactie
[quote:41001f4f9e="marientje"]idd, ik heb ooit ergens gelezen dat er geen _ en andere leuke tekentjes in je id- en class- names mogen voorkomen. Alleen lettertjes en cijfertjes.[/quote:41001f4f9e] Klopt niet helemaal. [url=http://www.w3.org/TR/CSS21/syndata.html#q6]Hier[/url] staat bijvoorbeeld:[quote:41001f4f9e] In CSS 2.1, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [A-Za-z0-9] and ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit, or a hyphen followed by a digit. Only properties, values, units, pseudo-classes, pseudo-elements, and at-rules may start with a hyphen (-); other identifiers (e.g. element names, classes, or IDs) may not. Identifiers can also contain escaped characters and any ISO 10646 character as a numeric code (see next item). For instance, the identifier "B&W?" may be written as "B\&W\?" or "B\26 W\3F".[/quote:41001f4f9e] Je mag dus de underscore en het koppelteken ook gewoon gebruiken. Een classname en een id-name mogen niet [b:41001f4f9e]beginnen[/b:41001f4f9e] met cijfers of speciale karakters.
Link naar reactie
Ik heb die afbeeldingen niet dus het wordt wat moeilijker om te testen, maar ik krijg het idee dat de regels in je CSS conflicteren. Het is bijvoorbeeld zo dat het bij links belangrijk is dat je ze in een bepaalde volgorde definieert, namelijk link, visited, hover, active, ezelsbruggetje [url=http://www.meyerweb.com/eric/css/link-specificity.html][b:a88f58afd7]L[/b:a88f58afd7]o[b:a88f58afd7]V[/b:a88f58afd7]e-[b:a88f58afd7]HA[/b:a88f58afd7]te[/url]). Misschien heb je wat aan de volgende links: www.tanfa.co.uk/css/examples/rollover-images-no-preload.asp http://wellstyled.com/css-nopreload-rollovers.html
Link naar reactie
[quote="meneer_ed"] Klopt niet helemaal. [url=http://www.w3.org/TR/CSS21/syndata.html#q6]Hier[/url] staat bijvoorbeeld:[quote:da2cf8b207] In CSS 2.1, [/quote:da2cf8b207] Er stond idd nog een aanvulling bij m'n validatie(voor CSS2), namelijk: "In addtition, underscores in selectors aren't supported by many browsers, although the are valid according to the CSS2 specification". Wel correct dus, maar in de praktijk niet altijd handig. Gebruik voor leesbaarheid anders CamelCase. Heeft de OP al iets getest in deze richting?
Link naar reactie

Om een reactie te plaatsen, moet je eerst inloggen

Gast
Reageer op dit topic

×   Geplakt als verrijkte tekst.   Herstel opmaak

  Er zijn maximaal 75 emoji toegestaan.

×   Je link werd automatisch ingevoegd.   Tonen als normale link

×   Je vorige inhoud werd hersteld.   Leeg de tekstverwerker

×   Je kunt afbeeldingen niet direct plakken. Upload of voeg afbeeldingen vanaf een URL in

  • Populaire leden

    Er is nog niemand die deze week reputatie heeft ontvangen.

  • Leden

    Geen leden om te tonen

×
×
  • Nieuwe aanmaken...