真正简单的问题,如何强制链接显示在h2标题的行内?
我有以下代码:http://jsfiddle.net/jezzipin/6DpPX/,并且我想使“返回页首”链接与“社交媒体”标题内联显示,但是我尝试的所有操作似乎均不起作用。甚至使用跨度。

任何帮助将不胜感激。

jme1988


N.B.只是要清楚,这就是我所追求的效果:

最佳答案

应用以下样式:

.page_title{
    font-size:18px;
    font-family: Arial,Helvetica,sans-serif;
    font-weight:400;
    padding-left:16PX;
    /*color:#053452; Dark Blue*/
    color: #729ABD;
    float:left;  //Added float
}

.b2t_link{
   float: right;
   margin-left: 794px;  //Reduced margin by width of page-title
   font-family: 'FamiliarProBold',Arial,Helvetica,sans-serif;
   font-size: 11px;
   color: #729ABD;
}


.two_col_textAndImage_text{
   width: 720px;
   font-size: 11px;
   display: block;
   float: left;
   padding-left: 5px;
   padding-right: 5px;
   padding-top: 10px;
   min-height: 300px;
}

#main-content{
   clear:both;
}


然后在html中将图像和文本包装在ID为divmain-content中。

     <div id="main-content">
        <div class="two_col_textAndImage_text">
            <h2 class="item_title_no_image">Social Media Integrations</h2>
            <p class="item_text_no_image">
                Social Media is fast becoming a channel for advertising, promoting and applying for vacancies. Some organisations have fully embraced this within their recruitment strategies whilst others have not yet or do not wish to adopt this trend. Whatever the view of your own organisation's recruitment channels, ATS2go has been designed to integrate seamlessly with social media. <br/><br/>
                Social Media buttons, such as Facebook, Twitter and LinkedIn can be embedded within you vacancy postings enabling visitors to your site to forward a link to their friends and contacts about your vacancies. In addition, ATS2go includes automative "Job Tweets" for your vacancies which include a link back to your recruitment page; people simply click on the link within the Tweet and can then find out more about the role and hopefully submit their application immediately - simple, easy and free! <br/><br/>
            </p>
        </div>
        <div class="two_col_textAndImage_image">
          <img / src="https://text-development.ats2go.com/img/content_images/social-media.jpg" width="250px"/>
        </div>
   </div>


示例:http://jsfiddle.net/6DpPX/8/

关于html - 在h2标题旁边对齐链接,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13836957/

10-14 17:31