1486 sujets

Web Mobile et responsive web design

Bonjour,
j'utilise bootstrap 3.3.7 et j'ai aussi créer un fichier css pour quelques modifications (hauteur, largeur, couleur, positionnement).
Seulement mes thumbnails ne sont pas responsive contrairement au reste de mon code et je ne vois pas pourquoi, voici mon code avec le css en dessous j'ai tenté des modification mais rien n'y fais.

<?php
// phpcs:disable Generic.Arrays.DisallowLongArraySyntax.Found
    require_once 'C:\Windows\System32/vendor/autoload.php';
    use ICal\ICal;
    try {
        $ical = new ICal('DU-A-R1-36.ics', array(
            'defaultSpan'                 => 2,     // Default value
            'defaultTimeZone'             => 'UTC',
            'defaultWeekStart'            => 'MO',  // Default value
            'disableCharacterReplacement' => false, // Default value
            'filterDaysAfter'             => null,  // Default value
            'filterDaysBefore'            => null,  // Default value
            'replaceWindowsTimeZoneIds'   => false, // Default value
            'skipRecurrence'              => false, // Default value
            'useTimeZoneWithRRules'       => false, // Default value
        ));
        // $ical->initFile('ICal.ics');
        // $ical->initUrl('https://raw.githubusercontent.com/u01jmg3/ics-parser/master/examples/ICal.ics');
    } catch (\Exception $e) {
        die($e);
    }
    $forceTimeZone = false;
    $room = "DU-A-R1-36";
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <!-- Latest compiled and minified CSS -->
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
        <link rel="stylesheet" type="text/css" href="testbis_jour.css">
        <title>PHP ICS Parser test</title>
        <style>body { background-color: #eee } .caption { overflow-x: auto }</style>
    </head>
    <body>
        <div class="container-fluid">
            <?php
                $showExample = array(
                    'interval' => true,
                    'range'    => true,
                    'all'      => true,
                );
            ?>
            <div class="progress" id="bis">
                <div class="progress-bar" id="secondbis" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;">
                    <span class="sr-only">100% Complete</span>
                    <table class="topTable">
                        <tr class="topBar">
                            <th class="navHeure">
                                <?php
                                $hournow = new datetime();
                                $hournow->modify('+1 hour');
                                echo $hournow->format('H:i') . ' - Room: ' . $room .'';
                                ?>
                            </th>
                            <th class="navDate">
                                <?php
                                $hournow = new datetime();
                                $hournow->modify('+1 hour');
                                echo $hournow->format('l jS F Y');
                                ?>
                            </th>
                            <th class="navEvent">
                                <?php
                                    if ($showExample['interval']) {
                                        $events = $ical->eventsFromInterval('3 days ago ');
                                        if ($events) {
                                            echo 'Events scheduled today';
                                        }
                                        else {
                                            echo 'No events scheduled today';
                                        }
                                        $count = 1;
                                ?>
                            </th>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="position_bar">
                <table class="heures">
                    <tr>
                        <th><time datetime="08:00">8h</time></th>
                        <th><time datetime="09:00">9h</time></th>
                        <th><time datetime="10:00">10h</time></th>
                        <th><time datetime="11:00">11h</time></th>
                        <th><time datetime="12:00">12h</time></th>
                        <th><time datetime="13:00">13h</time></th>
                        <th><time datetime="14:00">14h</time></th>
                        <th><time datetime="15:00">15h</time></th>
                        <th><time datetime="16:00">16h</time></th>
                        <th><time datetime="17:00">17h</time></th>
                        <th><time datetime="18:00">18h</time></th>
                        <th><time datetime="19:00">19h</time></th>
                        <th><time datetime="20:00">20h</time></th>
                    </tr>
                </table>
                <table class="tableline">
                    <tr class="lines">
                        <td class="linehours"></td>
                        <td class="linehours"></td>
                        <td class="linehours"></td>
                        <td class="linehours"></td>
                        <td class="linehours"></td>
                        <td class="linehours"></td>
                        <td class="linehours"></td>
                        <td class="linehours"></td>
                        <td class="linehours"></td>
                        <td class="linehours"></td>
                        <td class="linehours"></td>
                        <td class="linehours"></td>
                        <td class="linehours"></td>
                    </tr>
                </table>
                <div class="progress" id="first">
                    <div class="progress-bar" id="secondfirst" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;">
                        <span class="sr-only">100% Complete</span>
                        <div class="row">
                        <?php
                        $i=0;
                        $k=0;
                        foreach ($events as $event) : ?>
                            <?php
                            echo '<div class="col-md-1 placement'.$k.'">'
                            ?>
                                <?php
                                echo '<div class="thumbnail taille'.$i.'">';
                                ?>
                                    <div class="caption" style="text-align: center;">
                                        <h6><?php
                                            $dtstart = $ical->iCalDateToDateTime($event->dtstart_array[3], $forceTimeZone);
                                            $dtstart->modify('+1 hour');
                                            echo $event->summary . ' (' . $dtstart->format('d-m-Y H:i') . ') <br>';
                                            $dtend = $ical->iCalDateToDateTime($event->dtend_array[3], $forceTimeZone);
                                            $dtend->modify('+1 hour');
                                            echo $event->summary . ' (' . $dtend->format('d-m-Y H:i') . ')';
                                        ?></h6>
                                    </div>
                                <?php
                                echo '</div>';
                                ?>
                            <?php
                            echo '</div>';
                            ?>
                            <?php
                                if ($count > 1 && $count % 3 === 0) {
                                    echo '</div><div class="row">';
                                }
                                $count++;
                            ?>
                            <?php
                            if ($dtstart < $dtend) {
                                $diff=($dtend->getTimestamp() - $dtstart->getTimestamp())/60;
                                echo '<style type="text/css">
                                        .col-md-1 .taille'.$i.'
                                        {
                                            width: calc(0.1743em*'.$diff.');
                                        }
                                    </style>';
                            }
                            ?>
                            <?php
                            if ($dtstart < $dtend) {
                                $datenow2 = new datetime('11-02-2019 08:00');
                                $diff2=($dtstart->getTimestamp() - $datenow2->getTimestamp())/60;
                                echo '<style type="text/css">
                                        .placement'.$k.'
                                        {
                                            position: relative;
                                            left: calc(0.1725em*'.$diff2.');
                                        }
                                    </style>';
                            }
                            ?>
                        <?php
                        $i++;
                        $k++;
                        endforeach
                        ?>
                        </div>
                    </div>
                </div>
            </div>
            <?php } ?>
            <div class="rowbis">
                <div class="row">
                    <?php
                    foreach ($events as $event) : ?>
                        <?php
                        if ($showExample['interval']) {
                            $events = $ical->eventsFromInterval('3 days ago');
                        }
                            $dtstart = $ical->iCalDateToDateTime($event->dtstart_array[3], $forceTimeZone);
                            $dtstart->format('d-m-Y H:i');
                            $dtstart->modify('+1 hour');
                            $dtend = $ical->iCalDateToDateTime($event->dtend_array[3], $forceTimeZone);
                            $dtend->format('d-m-Y H:i');
                            $dtend->modify('+1 hour');
                            //$datenow = date('Y-m-d H:i');
                            $datenow = new datetime('11-02-2019 12:40');
                            $datenow->modify('+1 hour');
                            if (($datenow <= $dtend) && ($datenow >= $dtstart)) { ?>
                                <div class="col-md-4">
                                    <div class="thumbnail">
                                        <div class="caption" style="text-align: center;">
                                            <h2><?php
                                                echo $event->summary . ' (' . $dtstart->format('d-m-Y') . ') <br><br><br><br>';
                                                echo ' de ' . $dtstart->format('H:i') . ' à ' . $dtend->format('H:i') . '';
                                            ?></h2>
                                        </div>
                                    </div>
                                </div>
                        <?php } ?>
                    <?php
                    endforeach
                    ?>
                </div>
            </div>
        </div>
    </body>
</html>



body
{
	background-color: #333 !important;
}

#first
{
	height: 17.857142857142858em;
	margin-bottom: 1%;
	width: 100%;
}

#bis
{
	height: 3.5714285714285716em;
	margin-top: 0.5%;
	width: 100%;
}

#secondfirst
{
	background-color: #7ebc59;
}

#secondbis
{
	background-color: #e6dbc9;
}

.col-md-1 .thumbnail
{
	background-color: #e0474c;
	height: 20.83em;
	border-color: #e0474c;
}

.heures th
{
	width: 8.33%;
	color: #eee;
}

.heures
{
	margin-right: -0.3em;
}

.position_bar
{
	margin-top: 2%;
}

h4
{
	color: #eee;
}

.col-md-4 .thumbnail
{
	margin-top: 3%;
	height: 23.3em;
	background-color: #e6dbc9;
}

.topTable
{
	width: 100% !important;
}

.topBar
{
	width: 100% !important;
}

.topBar th
{
	color: #333;
	width: 40% !important;
}

.navHeure
{
	font-size: 1.4vw;
	font-weight: bold;
	padding-top: 1%;
}

.navDate
{
	font-size: 1.4vw;
	font-weight: 400;
	padding-top: 1%;
}
.navEvent
{
	font-size: 1.4vw;
	font-weight: 400;
	padding-top: 1%;
}

.linehours
{
	border-left: 0.15em solid #eee;
	padding: 0.4em;
	width: 8.33%;
}

.tableline
{
	margin-right: -0.3em;
}