博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
修复jQuery Autocomplete下拉菜单不能左对齐的情况
阅读量:4053 次
发布时间:2019-05-25

本文共 960 字,大约阅读时间需要 3 分钟。

集成了jquery autocomplete,不知道为什么生成的下拉框是居中的,没有左对齐,习惯性还是左对齐好看一点,所以修改了一下jquery.autocomplete.css这个样式文件,要想左对齐其实很简单,加上下面这一行代码就行:

text-align: left;

在.ac_results li里面添加,添加后css文件代码如下:

.ac_results {	padding: 0px;	border: 1px solid black;	background-color: white;	overflow: hidden;	z-index: 99999;}.ac_results ul {	width: 100%;	list-style-position: outside;	list-style: none;	padding: 0;	margin: 0;}.ac_results li {	margin: 0px;	padding: 2px 5px;	cursor: default;	display: block;	/* 	if width will be 100% horizontal scrollbar will apear 	when scroll mode will be used	*/	/*width: 100%;*/	font: menu;	font-size: 12px;	/*new add for left*/	text-align: left;	/* 	it is very important, if line-height not setted or setted 	in relative units scroll will be broken in firefox	*/	line-height: 16px;	overflow: hidden;}.ac_loading {	background: white url('indicator.gif') right center no-repeat;}.ac_odd {	background-color: #eee;}.ac_over {	background-color: #0A246A;	color: white;}

转载地址:http://ajxci.baihongyu.com/

你可能感兴趣的文章
使用file查看可执行文件的平台性,x86 or arm ?
查看>>
qt 创建异形窗体
查看>>
简单Linux C线程池
查看>>
内存池
查看>>
Qt继电器控制板代码
查看>>
wpa_supplicant控制脚本
查看>>
gstreamer相关工具集合
查看>>
RS232 四入四出模块控制代码
查看>>
linux 驱动开发 头文件
查看>>
container_of()传入结构体中的成员,返回该结构体的首地址
查看>>
ipconfig,ifconfig,iwconfig
查看>>
opensuse12.2 PL2303 minicom
查看>>
网络视频服务器移植
查看>>
Encoding Schemes
查看>>
移植QT
查看>>
如此调用
查看>>
计算机的发展史
查看>>
带WiringPi库的交叉编译如何处理一
查看>>
带WiringPi库的交叉笔译如何处理二之软链接概念
查看>>
Spring事务的七种传播行为
查看>>