html form-inline,如何將HTML
This is probably a basic html/css question...
這可能是一個基本的html/css問題……
I have a simple one-button form that I would like to display inline inside paragraph text.
我有一個簡單的單按鈕表單,我想在段落文本內顯示。
Read this sentence
type='submit'
value='or push this button'/>
.
Even though form has style=display:inline attribute, I get a linebreak before the form. Is there a way to get rid of it?
盡管表單具有style=display:inline屬性,但我在表單之前獲得了換行符。有辦法擺脫它嗎?
Can form elements appear inside
?
表單元素可以出現在
中嗎?
6 个解决方案
#1
71
Move your form tag just outside the paragraph and set margins / padding to zero:
將表單標記移到段落外,並將頁邊距/填充設置為0:
Read this sentence
#2
52
cannot go inside
, no. The browser is going to abruptly close your
element when it hits the opening
tag as it tries to handle what it thinks is an unclosed paragraph element:
不能進入
, no。瀏覽器會突然關閉
元素,當它點擊開始的標簽時,它試圖處理它認為是未關閉段落的元素:
Read this sentence
#3
19
You can try this code:
您可以試試下面的代碼:
User:
Password:
The important thing to note is the css style property in the
tag.
需要注意的是
標記中的css style屬性。
display:inline!important;
顯示:內聯!重要;
#4
6
According to HTML spec both
and
are block elements and you cannot nest them. Maybe replacing the
with would work for you?
根據HTML規范,
和
都是塊元素,不能嵌套。也許用替換
對你有用嗎?
EDIT: Sorry. I was to quick in my wording. The
element doesn't allow any block content within - as specified by HTML spec for paragraphs.
編輯:對不起。我的措詞很快。
元素不允許任何塊內容-如HTML規范為段落指定的那樣。
#5
0
You can accomplish what you want, I think, simply by including the submit button within the paragraph:
我認為,只要在段落中包含submit按鈕,就可以實現您想要的內容:
Read this sentence
#6
0
Just use the style float: left in this way:
使用樣式float:左:
Lorem Ipsum
Lorem Ipsum
html form-inline,如何將HTML相关推荐
- 面包屑的实现+tag功能实现+form表单
一 面包屑实现 打开VC/后台管理文件夹 在store/tab.js页面: 在CommonAside页面添加红方框代码: CommonHeader页面添加红方框代码: CommonHeader页面添加 ...
- 正则表达式语法规则收集
turnmissile 的 Blog http://blog.csdn.net/turnmissile/ Microsoft已经把正则表达式的规则收录在了msdn里面了,有兴趣的朋友可以自己去研究一下 ...
- iView学习笔记(三):表格搜索,过滤及隐藏列操作
iView学习笔记(三):表格搜索,过滤及隐藏某列操作 1.后端准备工作 环境说明 python版本:3.6.6 Django版本:1.11.8 数据库:MariaDB 5.5.60 新建Django ...
- 一个完整的增删改查模块(以我们的项目‘危化品库管理’模块为例)
父组件列表页面 <!-- 危化品库管理 --> <template><div><!-- 添加 --><div class="right ...
- 实际记录vue3中使用rrweb以及rrweb-player组件实现网页录屏和回放功能,还有遇到的问题和解决思考
文章目录 前言 一.rrweb与rrweb-player引入项目中 二.使用步骤 1.引入代码 2.html部分代码 3.script部分代码 三. 遇到的3个问题总结,全部都是找了很久解决办法没找到 ...
- Vue3+Vite+TS后台项目 ~ 10.商品管理
唯有热爱,可抵岁月长河 一.商品列表 ⒈ 接口封装 新建 src / api / product.ts 文件 import request from '@/utils/request' import ...
- vue-项目使用过程中遇到的一些问题
vue-项目使用过程中遇到的一些问题 最近项目比较忙,五一前要把初版做完,周六加了一天班,今天收尾,明天做测试联调,改改bug,后面再找用户提提意见,估计晃晃悠悠就到五一了. 项目确实让人成长,我是个 ...
- 第六天 黑马十次方 用户注册、用户登陆掌握js-cookie、微信扫码登陆、nuxt嵌套路由
学习目标: ** 完成用户注册功能 完成用户登陆功能,掌握js-cookie的使用 完成微信扫码登陆的功能 完成用户中心嵌套布局,掌握nuxt嵌套路由的使用 ** 1 用户注册 1.1 页面构建 创建 ...
- Bootstrap 4 snippets 代码段
Trigger Description b4-$ Bootstrap master template Alert Trigger Description b4-alert-additional-con ...
- mini.DataGrid使用说明
mini.DataGrid 表格.实现分页加载.自定义列.单元格渲染.行编辑器.锁定列.过滤行.汇总行等功能. Extend mini.Panel Usage <div id=" ...
最新文章
- fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
- Android中Toast的用法简介
- 计算机网络:第五章 传输层
- jquery删除数组中的某个元素下标越界_Java数据结构和算法(二)—数组
- 河中跳房子(noiopenjudge,noip2015)
- 用计算机弹奏hop,关于职称计算机Photohop模拟练习题参考
- android studio 引入arr的问题
- python 合并excel 自动更新_手把手教你4种方法用Python批量实现多Excel多Sheet合并
- Java Socket NIO
- 2015-10-07 jQuery2
- Ubuntu 18.04: Debug package with debug symbol
- C++11 range-based for loop
- mssql数据库基本语句总结(2)
- mysql索引和事务_MySQL事务和索引
- thinkphp5两种分页方法
- WEBPACK+ES6+REACT入门(4/7)-评论列表DEMO以及CSS样式
- 智慧校园家校综合信息化管理系统平台
- LUA C API接口
- php redis 令牌桶算法
- springCloud之Feign rpc调用