+ Antworten
Ergebnis 1 bis 2 von 2

Thema: Media-Abfrage hat immer min. ein Problem...

  1. #1
    TP-Junior ChristianPons macht alles soweit korrekt
    Registriert seit
    Sep 2008
    Ort
    Pons - Frankreich
    Beiträge
    8

    Media-Abfrage hat immer min. ein Problem...

    Hallo zusammen,

    ich überarbeite gerade unsere Site und mache die Neue mit HTML5 und CSS3. Allerdings suche ich seit Tagen die Lösung für die richtige Konfiguration der Medien-Abfrage für diverse Anzeigegrößen. Ich möchte für folgende Situationen die entsprechenden CSS-Dateien laden:

    Smartphone jeweils portrait und landscape
    iPhone4 (Retina-Display) jeweils portrait und landscape
    iPad jeweils portrait und landscape
    Desktop klein (max width 899px)
    Desktop groß (min width 900px)

    Bei den Abfragen bekomme ich kein "sauberes" Ergebnis. Speziell das iPad landscape macht Probleme, da es bei der Definition:

    HTML-Code:
    @import url("iPad1 Landscape.css") only screen and (-webkit-min-device-width : 768px) and (-webkit-max-device-width : 1024px) and (orientation : landscape);
    lieber auf die "Desktop groß" geht.

    Lasse ich die Desktop klein weg und mache die Desktop groß ab 1025px wird bei kleinerem Browserfenster alles ohne CSS angezeigt, da der Bildschirm ja keine orientation zur�ck gibt.

    Hat jemand von euch eine passende Abragesequenz? Ich habe viele Seiten per Google angeguckt, aber eigentlich sind nur Lösungen für Tablets da oder Desktop oder alles aber dann nur im portrait-Modus.... zum Auswandern
    Geändert von ChristianPons (03.02.2012 um 18:13 Uhr)

  2. #2
    TP-Junior ChristianPons macht alles soweit korrekt
    Registriert seit
    Sep 2008
    Ort
    Pons - Frankreich
    Beiträge
    8
    Lösung gefunden:

    es kommt auf die Reihenfolge der Einträge an. Die Abfrage sieht nun so aus und funktionert sauber auf iPhone 3G, iPhone 4, iPad und Desktop. Bei den Handhelds wird auch die Ausrichtung erkannt.

    Code:
    /* Desktop mittel */
    @import url("Desktop Mittel.css") only screen and (min-width : 481px) and (max-width : 950px) and (min-height : 481) and (max-height : 900px);
    
    /* Desktop */
    @import url("Desktop.css") only screen and (min-width : 951px);
    
    /* Phone portrait */
    @import url("Phone Portrait.css") only screen and (max-width:320px) and (max-height : 480px);
    
    /* Phone Landscape */
    @import url("Phone Landscape.css") only screen and (min-width : 321px) and (max-width : 480px);
    
    /* iPhone4 p */
    @import url("iPhone4 Portrait.css") only screen and (-webkit-min-device-pixel-ratio: 2) and (orientation : portrait);
    
    /* iPhone4 l */
    @import url("iPhone4 Landscape.css") only screen and (-webkit-min-device-pixel-ratio: 2) and (orientation : landscape);
    
    /* iPad1 portrait */
    @import url("iPad1 Portrait.css") only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait);
    
    /* iPad1 landscape */
    @import url("iPad1 Landscape.css") only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape);
    Vielleicht hilft es ja jemand - habe viel Zeit mit Probieren gebraucht.

+ Antworten

Ähnliche Themen

  1. Problem bei Media Center Extension
    Von anneon im Forum TYPO3
    Antworten: 0
    Letzter Beitrag: 17.03.2009, 22:31
  2. Problem mit Windows Media Player
    Von Christiane76 im Forum Video & Fotografie
    Antworten: 0
    Letzter Beitrag: 04.01.2008, 10:38
  3. Problem mit SQL-abfrage
    Von alexf812 im Forum Traum-Dynamik
    Antworten: 7
    Letzter Beitrag: 05.06.2007, 09:03
  4. Problem mit Abfrage
    Von Master_T2 im Forum Traum-Dynamik
    Antworten: 8
    Letzter Beitrag: 14.07.2005, 23:16
  5. ~Problem mit Videostream und Media Player~
    Von sandy77 im Forum HTML & CSS
    Antworten: 17
    Letzter Beitrag: 27.02.2005, 11:18

Stichworte

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

     

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51