При этом предполагается, что изображение находится в той же папке, что и файл css (не рекомендуется, images / fake-columns.gif лучше, так что на изображение ссылаются из папки изображений). Repeat-y будет повторять крошечное изображение вниз, покрывая всю высоту, которую покрывает div содержимого. Левый верхний угол гарантирует, что изображение начнет мозаично отображаться в левом верхнем углу, что вы обычно и хотите делать! Символ фунта перед содержимым, кажется, исчезает из моего примера css выше.

я есть 3 столбца макета с некоторыми деталями ниже столбцов.

Вы заметите, что высота одного столбца больше, чем у других. Я бы хотел, чтобы два других элемента автоматически заполняли оставшееся пространство (до синего элемента). Текст будет загружен динамически, поэтому мне нужно, чтобы он работал с любым столбцом большего размера (и на произвольную величину).

Можно ли это сделать с помощью HTML / CSS или мне нужно использовать JavaScript?

HTML-код (соответствующая его часть):

<div id="content">

    <div id="iconsHolder">

        <div id="info">
            <div id="info_content">
                <p><?php echo img('images/man.png'); ?></p>
                <h2>Some guy over here</h2>
                <p class="light justify">It doesn't matter what is being said at the moment. Nothing is said here.</p>
            </div>
        </div>

        <div id="comp">
            <div id="comp_content">
                <p><?php echo img('images/computer.png'); ?></p>
                <h2>Computer Development</h2>
                <p class="light justify">Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit... Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...</p>
            </div>
        </div>

        <div id="story">
            <div id="story_content">
                <p><?php echo img('images/library.png'); ?></p>
                <h2>Story telling</h2>
                <p class="light justify">This is another short story.</p>
            </div>
        </div>
    </div>
    <div id="details">
        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
    </div>

</div>

Код CSS (соответствующая его часть):

#content {
    width: 60em;
    margin: 0px auto;
}

#info,#comp,#story {
    width: 18em;
    float: left;
    padding-left: 1em;
    padding-right: 1em;
    padding-top: 2em;
    background-color: #DDD;
    height: 100%;
}

#info_content,#comp_content,#story_content {
    text-align: center;
}

#details {
    clear: both;
    background-color: #EEF;
    padding: 1em;
}

Ответы на вопрос(8)

Ваш ответ на вопрос