如何使两个div并排_html/css_WEB-ITnose
求助:用的是width:65px;folat:left;,然而并没有什么卵用,除了死么问题呢,代码贴在下面
<style type="text/css"> *{ margin:0px; padding:0px; } body{ padding-top:10px; } .main2{ width:65px; folat:left; } .main{ width:90px; /*height:80px;*/ margin:0 auto; /*background:#333;*/ font-size:8px; font-family:"微软雅黑"; text-align:left; folat:left; } .two .t_left,.two .t_right{ display:inline-block; } .two .t_left{ margin-right:8px; } .two .t_right{ margin-left:8px; }</style><script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript"> var sprint=window.opener.document.getElementById("printInfo"); document.write(sprint.innerHTML); printPage(); window.print(); function printPage(){ var show=""; var $tr=$(".content"); //返回行数组 for(var i=0;i<$tr.length;i++){ show=show+'<div><div class="main"><div class="one">1</div><div class="two"><span class="t_left">2.1</span><span class="t_right">2.2</span></div><div class="three">3</div></div><div class="main2"><img src="/static/imghw/default1.png" data-src="/../../dgAMS/images/ewm.jpg" class="lazy" / alt="如何使两个div并排_html/css_WEB-ITnose" ></div></div>'; } document.write(show); }</script></head><body></body> <script type="text/javascript"></script>
效果是这样的
回复讨论(解决方案)
我还看了半天,你没发现你打错字了么? 是float 不是folat!
原来是这样
现在所有的都并排了,怎么解决
现在所有的都并排了,怎么解决
那你想要什么样的效果?只要两个并排吗?如果自己两个并排,只需要在它们的外层加一个div,宽度设为一个的两倍,或者多一点点,只要不超过三个的宽度就行。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

How to distinguish between closing tabs and closing entire browser using JavaScript on your browser? During the daily use of the browser, users may...
