Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
2x background + fixed menu
#1
Zastanawiam się jak najlepiej rozwiązać sytuację przedstawioną na poniższym obrazku:

[Obrazek: 308wt49.gif]

Wszystko byłoby miło i przyjemnie gdybym nie musiał zachowywać kompatybilności z gównianymi przeglądarkami Wink Ktoś ma pomysł?
Odpowiedz
#2
takie?

Kod:
<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title> ... </title>
    <link rel="shortcut icon" href="/favicon.ico">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
</head>
<style>
    html, body {
        position: relative;
        height: 100%;
        margin:0;
    }
    .bg1 {
        position:absolute;
        top:0;
        right:80%;
        height:100%;
        background: url(http://ns223506.ovh.net/rozne/eafc71c4a2043a56ffd3395e5a3654d5/wallpaper-2860833.jpg) top right no-repeat;
        width:1000%;
    }
    .fixed-menu {
        position:fixed;
        top:0;
        left:20%;
        width:20%;
        height:100%;
        background-color: #fff;
        color:#333;
        padding:10px;
        -webkit-box-sizing:border-box;
        -moz-box-sizing:border-box;
        box-sizing:border-box;
        font:11px sans-serif;
    }
    .bg2 {
        position:absolute;
        top:0;
        left:40%;
        height:100%;
        width:1000%;
        background: url(http://ns223506.ovh.net/rozne/9e6efdb7a7772684483b4928b7f7615a/wallpaper-2856212.jpg) top left no-repeat;
    }
</style>
<body>

<div class="bg1"></div>
<div class="fixed-menu">Fixed Menu</div>
<div class="bg2"></div>

</body>
</html>
Odpowiedz
#3
Hmm... No nie do końca ale tak będzie git:

Kod:
<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title> ... </title>

</head>
<style>
    html, body {
        position: relative;
        height: 100%;
        margin:0;
    }
    .bg1 {
        position:absolute;
        top:0;
        right:80%;
        height:100%;
        left:0;
        background: url(http://ns223506.ovh.net/rozne/eafc71c4a2043a56ffd3395e5a3654d5/wallpaper-2860833.jpg) top right no-repeat;
    }
    .fixed-menu {
        position:fixed;
        z-index:2;
        top:0;
        left:15%;
        background:#fff;
        width:200px;
        height:100%;
        -webkit-box-sizing:border-box;
        -moz-box-sizing:border-box;
        box-sizing:border-box;
        font:11px sans-serif;
    }
    .bg2 {
        position:absolute;
        top:0;
        left:15%;
        height:100%;
        right:0;
        background: url(http://ns223506.ovh.net/rozne/9e6efdb7a7772684483b4928b7f7615a/wallpaper-2856212.jpg) top left no-repeat;
    }
</style>
<body>

<div class="bg1"></div>
<div class="fixed-menu">Fixed Menu</div>
<div class="bg2"></div>

</body>
</html>

Wiedziałem że to nic specjalnego ale pod koniec dnia pracy myślenie jest chyba bardziej zawiłe Wink Dzięki za pomoc Smile
Odpowiedz
#4
Jest zbyt ciepło i nam się mózgi przegrzewają. Normalna sprawa
Odpowiedz


Podobne wątki…
Wątek: Autor Odpowiedzi: Wyświetleń: Ostatni post
  problem z tłem pod menu loose 1 3,152 06-07-2017, 20:00
Ostatni post: loose
  problem z menu p410 10 10,323 18-06-2017, 18:34
Ostatni post: lemans88
  CSS dla menu i problem z selektorami neferith 4 5,254 30-06-2016, 00:58
Ostatni post: Brain23
  MENU - poważny problem wysokości! asus 0 2,528 05-12-2014, 23:34
Ostatni post: asus
  Trzypoziomowe menu - problem rejcz 3 5,657 25-01-2014, 17:16
Ostatni post: Kartofelek

Skocz do:


Użytkownicy przeglądający ten wątek: 1 gości
Sponsorzy i przyjaciele
SeoHost.pl