Home >Web Front-end >HTML Tutorial >How to make the fonts of two divs in li be on the same horizontal line_html/css_WEB-ITnose

How to make the fonts of two divs in li be on the same horizontal line_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:47:342417browse




b355560f890f220e6b9e62128ba8aadc
77387e85739d776de6c0b94a0b03e5deebad9246e9a88ca9986fdff86cf7d18e601bdcda215048560bf18a7e6cdd3415Application timec33fb2caaf719c6671a3cc263ec4570fGas station name of each status16b28748ea4df4d9c2150843fecfba68
cf4e43ee33fb2400078af8f01814f839Remarks16b28748ea4df4d9c2150843fecfba68bed06894275b65c1ab86501b08a632eb5db79b134e9f6b82c0b36e0489ee08ed16b28748ea4df4d9c2150843fecfba68
929d1f5ca49e04fdcb27f9465b944689
As in the title and picture, these fields cannot be on the same horizontal line superior.


Reply to the discussion (solution)

Let’s not talk about your style for now, but there are problems with the nested structure, at least it violates the front-end tag nesting Specification

In addition, for your results, especially if you want to display data, the easiest way is to use tables table

Regardless of your style, just embed There are problems with the nested structure, at least it violates the front-end tag nesting specification

In addition, for your results, especially if you want to display data, the easiest way is to use a table


I know you can use a form but this belongs to someone else. I just want to ask how these three fields can be on the same level. Thanks

For you 77387e85739d776de6c0b94a0b03e5de
55ee2b3284a9de9130dc7461686b5e1c These two classes plus equal line-height, such as line-height: 20px
You’re welcome

By the way, class="gg" Don’t use this either Forgot to arrange the three divs with equal heights and then set the line-height to be equal
The poster reminded me of the miserable experience when I was learning web pages

For you

55ee2b3284a9de9130dc7461686b5e1c These two classes plus equal line-height, such as line-height: 20px
You’re welcome


23d8e90cc7f33bf2aad4589baa167d53ebad9246e9a88ca9986fdff86cf7d18e601bdcda215048560bf18a7e6cdd3415Application timeb31460171d047a674843c208dc063415Each state gas station name16b28748ea4df4d9c2150843fecfba68
4a98c77643d096948063fd51686a5796Remarks16b28748ea4df4d9c2150843fecfba68< ;/li>5db79b134e9f6b82c0b36e0489ee08ed16b28748ea4df4d9c2150843fecfba68
You think so? No, Master... it’s useless

By the way, class="gg" Don’t forget to arrange the three divs with equal heights and then set the line-height to be equal
The original poster reminded me of that year It’s so miserable when learning web pages


Let me try

By the way, class="gg" Don’t forget to arrange the three divs at equal heights and then set the line-height to be equal
The original poster reminds me of the miserable experience when I was learning webpages


Hello, I set the equal height style="line-height:20px;" but it still doesn't work.

The style can be adjusted at will, which is the so-called page production

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style>ul{padding:0;margin:0;list-style:none;}a{text-decoration:none;color:#000;}.col-xs-25 span{float:left;margin-right:10px;}.col-xs-25 span:last{margin-right:0;}</style></head><body><a href="audit_company1.html"><ul class="roww">    <li class="col-xs-25" >      <span>申请时间</span>      <span>每个状态气站名</span>      <span>备注</span>    </li></ul></a></body></html>

The style can be adjusted at will, which is the so-called page production

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style>ul{padding:0;margin:0;list-style:none;}a{text-decoration:none;color:#000;}.col-xs-25 span{float:left;margin-right:10px;}.col-xs-25 span:last{margin-right:0;}</style></head><body><a href="audit_company1.html"><ul class="roww">    <li class="col-xs-25" >      <span>申请时间</span>      <span>每个状态气站名</span>      <span>备注</span>    </li></ul></a></body></html>


Thank you very much, and I especially thanked the html. Mainly, my css is quoted from others, and I didn’t write it myself. Thank you. Also, how can I set the page to be responsive to the browser, which means that it scales with the browser
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