• 25-12-2024, 10:56:20
    #10
    deks adlı üyeden alıntı: mesajı görüntüle
    Değişen birşey olmadı hocam...


    ne yapmamı önerirsiniz hocam? mobil cihazlarda tüm herşey normal çalışıyor bilgisayarda ise sadece bu dediğim problem mevcut
    videoyu göremedim atabilir misiniz
  • 25-12-2024, 11:01:03
    #11
    xmartogo adlı üyeden alıntı: mesajı görüntüle
    position fixed? top 15 left 15? bunlarla tek tek responsive yapmak uğraştırır
    Terzi53 adlı üyeden alıntı: mesajı görüntüle
    * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    }

    body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 120vh;
    overflow-x: hidden; /* Yatay taşmayı önler */
    }

    #nav-bar {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.1);
    color: #fff;
    width: 250px;
    max-width: 250px; /* Sabit genişlik */
    height: calc(100% - 120px);
    top: 120px;
    left: 0;
    overflow-y: auto;
    padding-top: 20px;
    transition: transform 0.3s ease-in-out;
    }

    #hamburger {
    position: fixed;
    top: 15px;
    left: 15px;
    background: #343a40;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1000;
    display: none;
    }

    #nav-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    display: block;
    color: #343a40;
    text-decoration: none;
    margin-bottom: 20px;
    }

    .nav-button a {
    display: block;
    padding: 10px 20px;
    color: #ccc;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    }

    .nav-button a:hover,
    .nav-button a.active {
    background-color: rgb(255 255 255 / 15%);
    color: #fff;
    }

    .container {
    margin-left: 250px; /* Nav-bar boşluğu */
    padding: 20px;
    flex: 1;
    color: rgba(0, 0, 0, 0.1);
    max-width: calc(100% - 250px); /* Taşmayı önler */
    }

    main.content {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    }

    article h2 {
    font-size: 1.5rem;
    color: white;
    }

    article div {
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap;
    }

    @media (max-width: 991px) {
    #nav-bar {
    transform: translateX(-100%);
    }

    #nav-bar.active {
    transform: translateX(0);
    }

    #hamburger {
    display: block;
    }

    .container {
    margin-left: 0;
    padding-left: 250px; /* Nav-bar için boşluk bırak */
    }
    }

    #search {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    }

    #search:focus {
    background-color: rgba(0, 0, 0, 0.1);
    color: #000;
    border-color: #ffffff;
    outline: none;
    }

    #search:laceholder {
    color: #888;
    }

    bunu dene eğer olmassa başka taracıda dene

    yok hocam olmadı.
    xmartogo adlı üyeden alıntı: mesajı görüntüle
    videoyu göremedim atabilir misiniz
    eklemeyi unutmuşum hocam,
    https://www.youtube.com/watch?v=-15Rc4WzTA0
  • 25-12-2024, 11:08:53
    #12
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Kategoriler</title>
    <style>
    /* Genel Sıfırlama */
    * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    }

    html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden; /* Yatay taşmayı engelle */
    background-color: #121212;
    font-family: 'Arial', sans-serif;
    }

    /* Sabit Yan Menü */
    #nav-bar {
    position: fixed;
    top: 120px;
    left: 0;
    width: 250px;
    height: calc(100% - 120px);
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    padding: 20px;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    }

    /* Hamburger Menüsü */
    #hamburger {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background-color: #343a40;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    display: none;
    }

    /* İçerik Konteyneri */
    .container {
    margin-left: 250px; /* Yan menüye yer bırak */
    padding: 20px;
    flex: 1;
    }

    main.content {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    }

    /* Başlık ve Arama Alanı */
    header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    }

    #search {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid #555;
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    max-width: 500px; /* Taşmayı engelle */
    }

    /* Nav İçeriği */
    .nav-button {
    margin-bottom: 15px;
    }

    .nav-button a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ccc;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
    }

    .nav-button a:hover, .nav-button a.active {
    background-color: #444;
    color: #fff;
    }

    /* Mobil Uyum */
    @media (max-width: 991px) {
    #hamburger {
    display: block;
    }

    #nav-bar {
    transform: translateX(-100%);
    }

    #nav-bar.active {
    transform: translateX(0);
    }

    .container {
    margin-left: 0;
    }
    }
    </style>
    </head>
    <body>
    <button id="hamburger"><i class="fas fa-bars"></i></button>
    <div id="nav-bar">
    <div id="nav-header">
    <a id="nav-title" href="#" style="color: white;">Kategoriler</a>
    </div>

    <div id="nav-content">
    <!-- Dinamik Kategori Listesi -->
    <?php foreach ($categories as $category): ?>
    <div class="nav-button">
    <a href="rolkitapcigi?category_id=<?= $category['id'] ?>"
    class="<?= $currentCategoryId == $category['id'] ? 'active' : '' ?>">
    <i class="fas fa-folder"></i><span> <?= htmlspecialchars($category['name']) ?></span>
    </a>
    </div>
    <?php endforeach; ?>
    </div>
    </div>

    <div class="container">
    <main class="content">
    <header>
    <h1 style="color: white;"><strong><?= htmlspecialchars($categories[array_search($currentCategoryId, array_column($categories, 'id'))]['name']) ?></strong></h1>
    <input type="text" id="search" placeholder="Ara...">
    </header>

    <?php foreach ($contents as $content): ?>
    <article>
    <h2 style="color: white;"><strong><?= htmlspecialchars($content['title']) ?></strong></h2>
    <div style="color: white;"><?= htmlspecialchars($content['content']) ?></div>
    </article>
    <?php endforeach; ?>
    </main>
    </div>

    <script>
    document.getElementById('hamburger').addEventListe ner('click', function () {
    const navBar = document.getElementById('nav-bar');
    navBar.classList.toggle('active');
    });
    </script>
    </body>
    </html>
  • 25-12-2024, 11:10:57
    #13
    Terzi53 adlı üyeden alıntı: mesajı görüntüle
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Kategoriler</title>
    <style>
    /* Genel Sıfırlama */
    * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    }

    html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden; /* Yatay taşmayı engelle */
    background-color: #121212;
    font-family: 'Arial', sans-serif;
    }

    /* Sabit Yan Menü */
    #nav-bar {
    position: fixed;
    top: 120px;
    left: 0;
    width: 250px;
    height: calc(100% - 120px);
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    padding: 20px;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    }

    /* Hamburger Menüsü */
    #hamburger {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background-color: #343a40;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    display: none;
    }

    /* İçerik Konteyneri */
    .container {
    margin-left: 250px; /* Yan menüye yer bırak */
    padding: 20px;
    flex: 1;
    }

    main.content {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    }

    /* Başlık ve Arama Alanı */
    header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    }

    #search {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid #555;
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    max-width: 500px; /* Taşmayı engelle */
    }

    /* Nav İçeriği */
    .nav-button {
    margin-bottom: 15px;
    }

    .nav-button a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ccc;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
    }

    .nav-button a:hover, .nav-button a.active {
    background-color: #444;
    color: #fff;
    }

    /* Mobil Uyum */
    @media (max-width: 991px) {
    #hamburger {
    display: block;
    }

    #nav-bar {
    transform: translateX(-100%);
    }

    #nav-bar.active {
    transform: translateX(0);
    }

    .container {
    margin-left: 0;
    }
    }
    </style>
    </head>
    <body>
    <button id="hamburger"><i class="fas fa-bars"></i></button>
    <div id="nav-bar">
    <div id="nav-header">
    <a id="nav-title" href="#" style="color: white;">Kategoriler</a>
    </div>

    <div id="nav-content">
    <!-- Dinamik Kategori Listesi -->
    <?php foreach ($categories as $category): ?>
    <div class="nav-button">
    <a href="rolkitapcigi?category_id=<?= $category['id'] ?>"
    class="<?= $currentCategoryId == $category['id'] ? 'active' : '' ?>">
    <i class="fas fa-folder"></i><span> <?= htmlspecialchars($category['name']) ?></span>
    </a>
    </div>
    <?php endforeach; ?>
    </div>
    </div>

    <div class="container">
    <main class="content">
    <header>
    <h1 style="color: white;"><strong><?= htmlspecialchars($categories[array_search($currentCategoryId, array_column($categories, 'id'))]['name']) ?></strong></h1>
    <input type="text" id="search" placeholder="Ara...">
    </header>

    <?php foreach ($contents as $content): ?>
    <article>
    <h2 style="color: white;"><strong><?= htmlspecialchars($content['title']) ?></strong></h2>
    <div style="color: white;"><?= htmlspecialchars($content['content']) ?></div>
    </article>
    <?php endforeach; ?>
    </main>
    </div>

    <script>
    document.getElementById('hamburger').addEventListe ner('click', function () {
    const navBar = document.getElementById('nav-bar');
    navBar.classList.toggle('active');
    });
    </script>
    </body>
    </html>

    daha cok bozuldu hocam
  • 25-12-2024, 11:12:56
    #14
    deks adlı üyeden alıntı: mesajı görüntüle

    daha cok bozuldu hocam
    benim kodlar buraya kadar yarışmadaki arkadaşlara başarılar
  • 25-12-2024, 11:23:02
    #15
    Terzi53 adlı üyeden alıntı: mesajı görüntüle
    benim kodlar buraya kadar yarışmadaki arkadaşlara başarılar
    düşünmeniz yeter hocam teşekkürler
  • 25-12-2024, 11:50:19
    #16
    <style>
    body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    }

    #nav-bar {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.1);
    color: #fff;
    width: 250px;
    height: calc(100% - 120px);
    top: 120px;
    left: 0;
    overflow-y: auto;
    padding-top: 20px;
    transition: transform 0.3s ease-in-out;
    }

    #hamburger {
    position: fixed;
    top: 15px;
    left: 15px;
    background: #343a40;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1000;
    display: none;
    }

    #nav-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    display: block;
    color: white;
    text-decoration: none;
    margin-bottom: 20px;
    }

    .nav-button a {
    display: block;
    padding: 10px 20px;
    color: #ccc;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    }

    .nav-button a:hover, .nav-button a.active {
    background-color: rgb(255 255 255 / 15%);
    color: #fff;
    }

    .container {
    margin-left: 250px;
    padding: 20px;
    flex: 1;
    color: rgba(0, 0, 0, 0.1);
    max-width: calc(100% - 250px);
    box-sizing: border-box;
    }

    main.content {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    }

    article h2 {
    font-size: 1.5rem;
    color: white;
    }

    article div {
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    }

    @media (max-width: 991px) {
    #nav-bar {
    transform: translateX(-100%);
    }

    #nav-bar.active {
    transform: translateX(0);
    }

    #hamburger {
    display: block;
    }

    .container {
    margin-left: 0;
    max-width: 100%;
    }
    }

    #search {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    }

    #search:focus {
    background-color: rgba(0, 0, 0, 0.1);
    color: #000;
    border-color: #ffffff;
    outline: none;
    }

    #search:laceholder {
    color: #888;
    }
    </style>

    <button id="hamburger"><i class="fas fa-bars"></i></button>
    <div id="nav-bar">
    <div id="nav-header">
    <a id="nav-title" href="#">Kategoriler</a>
    </div>

    <div id="nav-content">
    <?php foreach ($categories as $category): ?>
    <div class="nav-button">
    <a href="rolkitapcigi?category_id=<?= $category['id'] ?>"
    class="<?= $currentCategoryId == $category['id'] ? 'active' : '' ?>">
    <i class="fas fa-folder"></i><span> <?= htmlspecialchars($category['name']) ?></span>
    </a>
    </div>
    <?php endforeach; ?>
    </div>
    </div>

    <div class="container">
    <main class="content">
    <header>
    <h1 style="color: white;"><strong><?= htmlspecialchars($categories[array_search($currentCategoryId, array_column($categories, 'id'))]['name']) ?></strong></h1>
    <input type="text" id="search" placeholder="Ara...">
    </header>

    <?php foreach ($contents as $content): ?>
    <article>
    <h2 style="color: white;"><strong><?= htmlspecialchars($content['title']) ?></strong></h2>
    <div style="color: white;"><?= htmlspecialchars($content['content']) ?></div>
    </article>
    <?php endforeach; ?>
    </main>
    </div>

    denermisin
  • 25-12-2024, 11:58:13
    #17
    * {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Genişlik hatalarını önler */
    }

    body {
    overflow-x: hidden; /* Sağa kaymayı engeller */
    }

    .container {
    margin-left: 250px; /* Masaüstünde #nav-bar genişliği */
    }

    #nav-bar {
    position: fixed;
    top: 120px;
    left: 0;
    width: 250px;
    height: calc(100% - 120px);
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    }

    @media (max-width: 991px) {
    #nav-bar {
    transform: translateX(-100%);
    }

    #nav-bar.active {
    transform: translateX(0);
    }

    .container {
    margin-left: 0;
    }
    }
    Bunu da deneyebilirsiniz
  • 25-12-2024, 13:13:58
    #18
    aşağıda ki css i denermisin
    .container {
      margin-left: 230px;
      padding: 20px;
      flex: 1;
      color: rgba(0, 0, 0, 0.1);
      max-width: calc(100% - 230px);
      box-sizing: border-box;
      overflow-x: hidden;
    }
    
    body {
      font-family: 'Arial', sans-serif;
      margin: 0;
      padding: 0;
      display: flex;
      min-height: 100vh;
      flex-direction: column;
    }
    
    
    @media (max-width: 991px) {
      .container {
        margin-left: 0;
        width: 100%;
      }
    }
    
    #nav-bar {
      position: fixed;
      background-color: rgba(0, 0, 0, 0.1);
      color: #fff;
      width: 250px;
      height: calc(100% - 120px);
      top: 120px;
      left: 0;
      overflow-y: auto;
      padding-top: 20px;
      transition: transform 0.3s ease-in-out;
      box-sizing: border-box;
    }
    
    @media (max-width: 991px) {
      #nav-bar {
        transform: translateX(-100%);
      }
    
      #nav-bar.active {
        transform: translateX(0);
      }
    
      #hamburger {
        display: block;
      }
    }