如何对齐照片和文字

时间:2015-08-23 21:41:33

标签: html css html5

如何在单词中插入新照片,将其作为引号,以便我尝试做类似

的操作

“远方的一切看起来都很完美”

但这看起来如何

enter image description here

有没有办法将最后一个引号对齐?

<p>
  <em>
   <img src="images/quotes-1.jpg" width="45" height="35" style="float:left" alt="quotations"/>  
   Everything seems perfect from far away
   <img src="images/quotes-2.jpg" width="45" height="35" style="float:right" alt="quotations"/>
  </em>
</p>

4 个答案:

答案 0 :(得分:1)

删除float: left;float: right;。然后将line-height: 35px;添加到em

答案 1 :(得分:1)

移除浮子。 Example

        <p>
            <em>
                <img src="images/quotes-1.jpg" width="45" height="35" alt="quotations"/>  
                Everything seems perfect from far away
                <img src="images/quotes-2.jpg" width="45" height="35" alt="quotations"/>
            </em>
        </p>

答案 2 :(得分:0)

尝试使用内联块div

来包围它
devtools::install_github("MarcinKosinski/RTCGA", build_vignettes=TRUE)
Downloading github repo MarcinKosinski/RTCGA@master
Installing RTCGA
'/usr/lib/R/bin/R' --vanilla CMD build  \
  '/tmp/RtmpA7il1Q/devtools5fc871b48f57/MarcinKosinski-RTCGA-e47bdf6'  \
  --no-resave-data --no-manual 

* checking for file ‘/tmp/RtmpA7il1Q/devtools5fc871b48f57/MarcinKosinski-RTCGA-e47bdf6/DESCRIPTION’ ... OK
* preparing ‘RTCGA’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
Removed empty directory ‘RTCGA/ghPage’
Removed empty directory ‘RTCGA/inst’
* building ‘RTCGA_0.99.6.tar.gz’

'/usr/lib/R/bin/R' --vanilla CMD INSTALL  \
  '/tmp/RtmpA7il1Q/RTCGA_0.99.6.tar.gz'  \
  --library='/home/mkosinski/R/x86_64-pc-linux-gnu-library/3.2'  \
  --install-tests 

* installing *source* package ‘RTCGA’ ...
** R
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
Warning in file(con, "w") :
  cannot open file '/home/mkosinski/R/x86_64-pc-linux-gnu-library/3.2/RTCGA/doc/index.html': No such file or directory
Error in file(con, "w") : cannot open the connection
ERROR: installing vignettes failed
* removing ‘/home/mkosinski/R/x86_64-pc-linux-gnu-library/3.2/RTCGA’
* restoring previous ‘/home/mkosinski/R/x86_64-pc-linux-gnu-library/3.2/RTCGA’
Error: Command failed (1)

答案 3 :(得分:0)

你应该删除属性 float

from django import forms

class ContactForm(forms.Form):
    # Everything as before.
    ...

    def clean(self):
        cleaned_data = super(ContactForm, self).clean()
        cc_myself = cleaned_data.get("cc_myself")
        subject = cleaned_data.get("subject")

        if cc_myself and subject:
            # Only do something if both fields are valid so far.
            if "help" not in subject:
                raise forms.ValidationError(
                    "Did not send for 'help' in the subject despite "
                    "CC'ing yourself."
                )