与css对齐 [英] aligning with css
问题描述
我不知道。
- 我想把红色,绿色,蓝色的盒子对齐成一行
- 红色,绿色,蓝色必须是45px高
- 红色(中心)必须尽可能宽
- 黄色必须从线下方开始
- 黄色必须与红色对齐。
请帮助!
<!DOCTYPE html PUBLIC" - // W3C // DTD HTML 4.01 Transitional // DE">
< html>
< head>
< style>
>
/ *主要区域* /
.X1 {
显示:内联;
背景颜色:绿色;
margin-left:32px;
宽度:12px;
身高:45px;
}
.X2 {
显示:内联;
背景颜色:红色;
宽度:90%;
身高:45px;
}
.X3 {
显示:内联;
背景颜色:蓝色;
宽度:12px;
身高:45px;
}
.Y2 {
宽度:90%;
背景颜色:黄色;
margin-top:45px;
margin-left:44px;
}
< / style>
< / head>
< body>
< div class =" X1">& nbsp;< / div>
< div class =" X2"> Header< / div>
< div class =" X3">& nbsp; < / div>
< div class =" Y2">她是一些长文< / div>
< / body> < / html>
-
-Gernot
int main(int argc,char ** argv){printf
("%silto%c%cf%cgl%ssic%ccom%c"," ma",58,''g'',64," ba",46,10 );}
________________________________________
寻找好游戏?亲自动手吧!
GLBasic - 你可以这样做
www.GLBasic .com
" Gernot Frisch" < Me@Privacy.net>写道:
我不知道。
以下是一些:
不要多帖。
不要上传代码,使用真实内容上传最小化的例子。
-
Spartanicus
我不知道。
以下是一些:
不要多发帖子。
我被告知这个NG处理CSS,所以我发布在这里,知道什么是
另一个答案是。
不要上传代码,使用真实内容上传最小化的例子。
看看我的代码 - 它是_
问题所需的最低代码。
我对我的问题有任何想法吗?
Gernot Frisch写道:
我不知道。
- 我想把红色,绿色,蓝色的盒子对齐在一个林中e - 红色,绿色,蓝色必须是45px高
- 红色(中心)必须尽可能宽
- 黄色必须从线下方开始
- 黄色必须是左边与红色对齐。
在X1,X2,X3中更改display:inline tofloat:left。
在Y2变化中margin-top:45px至保证金权利:44px。删除宽度:90%。
-
jmm(连字符)列表(at)sohnen-moe(点)com >
(删除电子邮件的.AXSPAMGN)
Hi,
I have no clue.
- I want to align the red, green, blue boxes in one line
- red,green,blue must be 45px high
- red (center) must be as wide as possible
- yellow must start exactly below the line
- yellow must be left aligned with red one.
Please, please help!
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//DE">
<html>
<head>
<style>
/* MAIN AREA*/
.X1{
display:inline;
background-color: green;
margin-left: 32px;
width: 12px;
height: 45px;
}
.X2{
display:inline;
background-color: red;
width: 90%;
height: 45px;
}
.X3{
display:inline;
background-color: blue;
width: 12px;
height: 45px;
}
.Y2{
width:90%;
background-color: yellow;
margin-top: 45px;
margin-left: 44px;
}
</style>
</head>
<body>
<div class="X1"> </div>
<div class="X2">Header</div>
<div class="X3"> </div>
<div class="Y2">Her is some long text</div>
</body></html>
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, ''g'', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com
"Gernot Frisch" <Me@Privacy.net> wrote:
I have no clue.
Here are a few:
Don''t multi post.
Don''t upload code, upload a minimised example using real content.
--
Spartanicus
I have no clue.
Here are a few:
Don''t multi post.
I was told that this NG handles CSS, so I posted here, knowing what
the other answer would be.
Don''t upload code, upload a minimised example using real content.
Take a look at my code - it _is_ the minimum required code for my
problem.
Any idea about my problem?
Gernot Frisch wrote:
I have no clue.
- I want to align the red, green, blue boxes in one line
- red,green,blue must be 45px high
- red (center) must be as wide as possible
- yellow must start exactly below the line
- yellow must be left aligned with red one.
In X1, X2, X3 change "display:inline" to "float:left".
In Y2 change "margin-top: 45px" to "margin-right: 44px". Delete "width:90%".
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
这篇关于与css对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!