如何对齐< div>在设计中完美标记? [英] How to allign <div> tag perfectly in design ?

查看:80
本文介绍了如何对齐< div>在设计中完美标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友



我想知道如何对齐< div> 标签根据设计页面的内容?并给我一些示例代码,链接。



我想在中设计一个表格式< div> 但是我没有得到正确的对齐我也使用了div宽度100%而且浮动:左边也有东西丢失...



指导我...





谢谢

Vikyas

解决方案

尝试

 <   style     type   =  text / css >  

header
{
width < span class =code-keyword> 100%;
background-color Teal;
}
left
{
width 50%;
< span class =code-attribute> background-color Aqua;
float left;
}

right
{
width 50%;
background-color Silver;
float left;
}
< / 风格 >

< span class =code-keyword>&l t; div class = 标题 >
主要部分
< / div >
< div class = left >
剩余
< / div >
< div class = right >
正确
< / div > < /跨度>


Hello Friends

I want to know how to allign < div > tags according to the content of the design page ? and give me some example code,links.

I want to design a table format inside the < div > but I am not getting proper allignment I used div width to 100% also and float:left also but something is missing...

Guide Me...


Thanks
Vikyas

解决方案

Try

<style type="text/css">

.header
{
    width:100%;
    background-color:Teal;
}
.left
{
    width:50%;
    background-color:Aqua;
    float:left;
}

.right
{
    width:50%;
    background-color:Silver;
    float:left;
}
</style>

<div class="header">
    Head section
    </div>
    <div class="left">
    Left
    </div>
    <div class="right">
    Right
    </div>


这篇关于如何对齐&lt; div&gt;在设计中完美标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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