如何制作一个里面有两个div的div? [英] How to make a div with two div inside?

查看:46
本文介绍了如何制作一个里面有两个div的div?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习 html,我正在尝试做一个面板,上面有人物的照片和一些关于那个人的数据,例如姓名、电子邮件、电话号码等.我不知道该怎么做, 如何将一个 div 放在 other 里面.

I'm learning html and I'm trying to do something like a panel with photos of people and some data about that person, for example, name, email, phone number etc. I don't know how to do this, how to put a div inside other.

我该怎么做才能生成在此图像中生成类似内容的 html 代码?带有某种颜色的大"div,这个包含两个隐形"div,一个用于图像,另一个用于有关人的信息.

how can I do for make a html code who generates something like in this image? The "big" div with some color, and this one contains two "invisible" div, one for the image and the other for the information about the person.

PS.:网站在平台上:sites.google.com(暂时不能改,必须用这个)

PS.: The website is on the platform: sites.google.com (can't change for while, have to use this)

推荐答案

使用 css 属性 display: inline-block 在您希望彼此相邻放置的 div 上,或 float:右 或左.我更喜欢显示.

Use css attribute display: inline-block on the div's you wish to place next to each other, or float: right or left. I prefer display.

这篇关于如何制作一个里面有两个div的div?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆