Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 无法放置两个div';她挨着对方,什么都试过了_Html_Css - Fatal编程技术网

Html 无法放置两个div';她挨着对方,什么都试过了

Html 无法放置两个div';她挨着对方,什么都试过了,html,css,Html,Css,我想把文本放在图片的右边,图片和文本应该放在页面的右边一点,但这对我不起作用 <div id="container"> <div class="desc"> <div> <img class="imgD" src="C:\Users\Hadia\Dropbox\college\unit 14 Webdesign\images\red-lipstic.jpg"/> </div> <div c

我想把文本放在图片的右边,图片和文本应该放在页面的右边一点,但这对我不起作用

<div id="container">

<div class="desc">
    <div>
        <img class="imgD" src="C:\Users\Hadia\Dropbox\college\unit 14 Webdesign\images\red-lipstic.jpg"/>
    </div>
    <div class=".introHeader">
        <h4> Red Lipstic | MAC </h4>
        <p class="price">&#163;20.00</p>
    </div>
    <div>
        <p >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. </p>
    </div>
</div>

</div>

红色唇膏

&163;20.00

Lorem Ipsum只是印刷和排版行业的虚拟文本。自16世纪以来,Lorem Ipsum一直是行业标准的虚拟文本,当时一位不知名的印刷商拿起一个打印工具,将其拼凑成一本打印样本书。它不仅存活了五个世纪,而且还跨越到电子排版,基本上保持不变。它在20世纪60年代随着包含Lorem Ipsum段落的Letraset表单的发布而流行,最近随着Aldus PageMaker等桌面出版软件的发布,包括Lorem Ipsum版本


创建一个包含文本的新文件(和两个文件),然后调用

width: 33%
float: left;
关于图像分割与分割

width: 60%
float: right;
在文本div上,根据需要调整宽度。此外,对于您在下面添加的任何内容,请确保

clear: both;

像这样?-->。考虑查找<代码>浮点 >注意:你应该阅读关于你使用的标签的描述。标签
jsfiddle
是关于使用jsfiddle的问题的
,并不是为了表明您已经包含了一个jsfiddle。@t.niese抱歉,我的错误仍然是新的。谢谢你提醒我!请编辑此小提琴点击保存并给我链接