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
Release: 2016-06-24 11:47:34
Original
2420 people have browsed it





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


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

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



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>
Copy after login
Copy after login

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>
Copy after login
Copy after login


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
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template