


1. Box model problem: Please reset CSS
2. Buttons are not aligned: Please float or vertical -align:middle;Thencalculate the width and height to align them;
3. IE8 text is not centered : line-height attribute Note: IE8 does not support font writing (or a certain style does not support it)
The IE browser has been tested to IE8, use IE5, 6, and 7 with caution.
Cause of the problem: box model
1. Box model:
Put 2 inputs on the page, a text text box and a button button ( Set width and height without any other styles)
input[type='text']{width:400px;height:45px;}
input[type='button']{width: 45px;height:45px;}
Observation: IE8: Text box border:1px;padding:2px;
. :Text box border:1px;padding:2px;
Button border:3px;padding:0px 8px;
Google: Text box border:2px;padding:1px 0px;
Button border:2px;padding:1px 6px;
Add style to make border and padding the sameinput[type='text']{width:400px ;height:45px;border:1px solid red;padding:0;}
input[type='button']{width:45px;height:45px;border:1px solid red;padding:0;}
Observation:
IE8: Text box border:1px;content:202x47 (IE's box model)
Button border:1px;content:45x45 (IE's box model) )
Firefox: Text box border:1px;content:200x45
Button border:1px;content:43x43
Google: Text box border:1px;content:200x45
Button border:1px;content:43x43
2. Button alignment method: Floating(The reason is that the Offset is different and I have not searched for more knowledge. You can supplement this aspect by yourself. Knowledge);input[type='text']{width:400px;height:45px;border:1px solid red;padding:0;float:left;}
input[type='button ']{width:45px;height:45px;border:1px solid red;padding:0;float:left;}
Refer to step 2,
(Some may not have border, use the background color instead, please set border:0; adjust the height yourself) input[type='text']{width:400px;height:45px;border:1px solid red; padding:0;float:left;}input[type='button']{width:47px;height:47px;border:1px solid red;padding:0;float:left;}
Replace font:normal 18px "Microsoft Yahei"; with font-size:18px;font-style: normal;font-family:"Microsoft Yahei"!
Or (you can use font:normal 18px "Microsoft Yahei"; writing method, but it is not in the middle)
input[type='text']{width:400px;height:25px; padding:10px 0px;border:1px solid red;float:left;}input[type='button']{width:47px;height:47px;line-height: 47px;border:1px solid red;padding: 0;float:left;}
The above is the detailed content of Share an example tutorial on vertical centering of input text and button alignment issues. For more information, please follow other related articles on the PHP Chinese website!

Windows 安全按钮是什么?顾名思义,Windows 安全按钮是一项安全功能,可让您安全地访问登录菜单并使用密码登录您的设备。 在这种情况下,智能手机绝对领先。但是 Windows 便携式设备(例如平板电脑)已经开始添加一个 Windows 安全按钮,它不仅仅是一种将不需要的用户拒之门外的方式。它还提供额外的登录菜单选项。尽管如果您试图在台式 PC 或笔记本电脑上找到 Windows 安全按钮,您可能会感到失望。这是为什么?平板电脑与个人电脑Windows 安全按钮是一个物理按钮,存在于平板

Windows 资源管理器在包含视频和图像文件的所有文件夹中创建一个名为Thumbs.db的隐藏系统文件。扩展名db代表数据库。所以Thumbs.db基本上是一个数据库文件,其中包含您正在查看的文件夹中的图像,但图像将是缩略图大小。即使您删除了这些文件,Windows 资源管理器也会再次创建它们。虽然这是增强系统性能和用户体验的一个很好的功能,但是当涉及到网络文件夹时,这可能会产生一些问题。在本文中,我们通过 2 种不同的方法解释了如何轻松禁用或删除Windows 11/10 中网络文件夹上的T

最近发布的 Microsoft Edge 108没有提供很多令人兴奋的功能或改进。此外,一项未经宣布的更改可能会使某些用户感到困惑甚至不安。最新版本自动隐藏前进按钮,默认只留下后退和重新加载。并不是每个人都会对微软改变标准导航控件的工作方式感到满意,因此这里有一个小教程,展示了如何恢复 Microsoft Edge 108 中的前进按钮。值得注意的是,Microsoft Edg

长期以来,InternetExplorer的失宠一直不是秘密,但随着Windows11的到来,现实开始了。Edge将来不再有时取代IE,它现在是微软最新操作系统中的默认浏览器。目前,您仍然可以在Windows11中启用InternetExplorer。但是,IE11(最新版本)已经有了一个正式的退役日期,即2022年6月15日,时间在流逝。考虑到这一点,您可能已经注意到InternetExplorer有时会打开Edge,而您可能不喜欢它。那么为什么会这样呢?在

越来越多的用户开始升级win11系统,由于每个用户的使用习惯不同,还是有不少用户在使用ie11浏览器,那么win11系统用不了ie浏览器,该怎么办呢?windows11还支持ie11吗?下面就来看看解决办法。win11无法使用ie11浏览器的解决方法1、首先右键开始菜单,选择“命令提示符(管理员)”打开。2、打开之后,直接输入“Netshwinsockreset”,回车确定。3、确定之后再输入“netshadvfirewallreset&rdqu

准备工作用vuecreateexample创建项目,参数大概如下:用原生input原生的input,主要是value和change,数据在change的时候需要同步。App.tsx如下:import{ref}from'vue';exportdefault{setup(){//username就是数据constusername=ref('张三');//输入框变化的时候,同步数据constonInput=;return()=>({

laravel input隐藏域的实现方法:1、找到并打开Blade模板文件;2、在Blade模板中使用method_field方法来创建隐藏域,其创建语法是“{{ method_field('DELETE') }}”。

如何在 Windows 10 上交换鼠标按钮首先,我们将了解如何在 Windows 10 上为左撇子用户配置鼠标。您可以使用“设置”菜单或较旧的“控制面板”来完成此操作。使用设置要使用设置在 Windows 10 上交换鼠标按钮:单击开始 > 设置。当Settings打开时,单击Devices > Mouse并将主按钮从Left更改为Right。使用控制面板要使用控制面板在 Windows 10 上交换鼠标按钮:要使用控制面板,请打开开始菜单并键入control panel。选择最上


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.