Home >Web Front-end >HTML Tutorial >float compatible alignment_html/css_WEB-ITnose

float compatible alignment_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:22:131411browse

Reply to discussion (solution)

Where is the code?
Post it at http://jsfiddle.net/.

23 is the two DIVs that came out through loop 1. Now I want to align the left border of 1 with the left border of 4, and the right border of 3 with the right border of 4; 123 are all floating.

If the outer package DIV is set to text-align:center and the DIV inside is not floated, it will align itself. .

If the outer package DIV is set to text-align:center and the DIV inside is not floated, it will align itself. .
I want to ask, how to be on the same line without floating.

There are many display methods in css
display: block/inline-block/inline
The outer wrapping div setting text-align:center
The inner small DIV setting is relatively Small width display:inline-block
can make it automatically appear in the play

It’s a problem with IE6’s double margins. No wonder it’s always misaligned. I’ll remember it this time and I’ll do it next time. Post the code honestly.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn