复制简单图像/文本布局的CSS和JavaScript

时间:2013-02-07 22:49:38

标签: css

所以我正在尝试复制页面布局,它是一个图像,它是页面的完整高度,右侧有文本。文字宽度似乎根据图像调整,我只是不确定它是如何完成的。 http://mcgarrybowen.com/en/People/Bill-Borrelle那是页面,有关如何完成的任何想法?

这是我尝试的但是工作不正常,看起来像http://www.klossal.com/klossviolins/about.html

<div style="width:100%;padding-top:40px;padding-bottom:40px;">
<div style="width:920px;position:relative;">
    <div style="float:left;">
        <img style="height:100%;" src="http://www.klossal.com/klossviolins/elements/horst.jpg" alt="">
    </div>
    <div style="float:left;">
    <p style="color: #b9b8b4;
      font-family: 'Source Sans Pro' , sans-serif;
      font-size: 24px;
      text-align: left;   
      position:relative;
      width:auto;">About</p>            

    <p style="color: #b9b8b4;
      font-family: 'Source Sans Pro' , sans-serif;
      font-size: 14px;
      text-align: left;      
      position:relative;
      width:auto;">
        Mittenwald-trained, Master Violin Maker, Horst Kloss, has worked with fine stringed instruments and bows for over three decades. The Kloss Shop specializes in the repair, restoration, appraisal and sale of historic instruments and bows. Mr. Kloss further offers acoustic adjustment tailored to the individual musician's requirements, the application of museum conservation standards to preserve instrument integrity and maintain value as well as baroque conversion. Mr. Kloss is experienced in providing musicians with custom instrument set up designed to prevent overuse syndrome while maintaining maximal adjustment of tonal color, clarity and projection.<br><br>

        Since 1972, Horst Kloss has cared for collections of note along the East Coast of the United States, including the Boston Museum of Fine Art's collection of historic stringed instruments. He is one of under a hundred makers, nation-wide, whose extensive training and high caliber skills qualified him for full membership status in the American Federation of Violin and Bow Makers.<br><br>

        Raised among musicians and makers, Horst Kloss was imbued with a love of music and a profound sense of stewardship in caretaking for stringed instruments. At the age of 14, he began an apprenticeship in his hometown of Mittenwald, a center for violin-making since the 1600's. He received his formal training at the Bavarian State School of Violin Making in Southern Germany where he earned his Journeyman's diploma in 1964 and his Master's degree in 1972 under the tutelage of Josef Kantuscher. He moved to the United States in 1964 following the exodus of finer instruments from Europe and gained exposure to many of them while working for Carl Becker at Lewis & Sons. Mr. Kloss instructs the courses offered in instrument repair and restoration at the University of New Hampshire's Violin Craftsmanship Institute. He established shops in Houston and Boston before settling in Needham, Massachusetts.<br><br>

        Horst Kloss has attracted an international clientele, including many distinguished concert performers, who value his consistently high quality restoration and sound adjustments. His experienced eye and broad client base make him especially well-suited to bring buyers and sellers of fine stringed instruments together.</p>
        </div>
        <br class="clear">

</div>

1 个答案:

答案 0 :(得分:1)

布局基于Twitter Bootstrap构建,并实现了responsive功能。

更新:这是一个开始。您应该使用类而不是所有这些内联样式。这使得修改布局变得非常容易。

http://jsfiddle.net/xfPKx/2/

.wrapper {
    width:100%;
}
.portrait {
    height: 100%;
    left: 0;
    position: fixed;
    width: 50%;
}
.text {
    float: right;
    margin: 5% 0;
    max-width: 30%;
    width: auto;
}

<div class="wrapper">
    <div class="portrait">
        <img src="http://www.klossal.com/klossviolins/elements/horst.jpg" alt=""
        />
    </div>
    <div class="text">
...