position

Repositioning nav buttons in p:wizard

跟風遠走 提交于 2019-12-03 14:09:02
问题 I wish to place the navigation buttons right under the step titles of the primefaces wizard component: Since primefaces generates the both step tiles and content of the wizard together, I wasn't sure on how to insert an element (in this case, the nav buttons) between the two parts of the wizard component. Anyway to do this? Thanks :) 回答1: The easiest solution is to set your wizard not to show the navigator buttons, then create a button of your own: <p:wizard widgetVar="myWizard" showNavBar=

CSS实现文字和图片的水平垂直居中

橙三吉。 提交于 2019-12-03 14:04:16
CSS实现文字和图片的水平垂直居中   关于文字和图片的水平垂直居中,在前端界绝对算是一个老生常谈的问题了,尤其是垂直居中,什么千奇百怪的解法都能想的出来。下面我就总结一些比较常用的方法: 一、文本的水平垂直居中: 1、水平居中: 是不是很开心?超级简单的问题,一个text-align:center 就搞定了。过过过... -------------------------------------下面看单行、多行文本的垂直居中------------------------------------- 2、垂直居中:   1)、单行文本 <!--只要height值等于line-height值就ok -- > <div style="height:100px;line-height:100px;"> 有且仅占有一行的情况下垂直居中 </div> ps:height === line-height 无法使替换元素,如<img>、<input>、<areatext>、<select>...垂直居中,必须有<a>、<span>...类似行内标签配合才能使垂直居中生效! (下面的图片垂直居中解法5 会用到这个特性)   2)、多行文本 情况1:高度固定 关键属性:display:tabel-cell; vertical-align:middle; <style>div{height:300px

IE 6 vs. position:fixed

…衆ロ難τιáo~ 提交于 2019-12-03 13:42:28
position:fixed that doesn't work for Internet explorer 6. I can't really understand the fixes found on google. I need it to work in IE6, IE7, IE8 & FireFox 3.0. <!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" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" /> <title>Sidebar fixed</title> <style type="text/css"> #wrapper { position:relative; width:900px; margin:0 auto 0 auto; } #sidebar_left { position:fixed; height:200px;

Determining location of tray icon

ε祈祈猫儿з 提交于 2019-12-03 13:30:53
My application is designed to sit in the system tray and behave similarly to the Network/Volume/Power/Action Centre tray items in Windows 7 (and the equivalent items in Windows Vista). That is, it becomes visible when the tray icon is clicked, and becomes hidden when focus is lost. The application is written in WPF, but I am currently using NotifyIcon from WinForms for the tray icon. I would like to know if anyone has any suggestions as to how I might determine the position (i.e. screen coordinates) of my application's tray icon. The default Windows Vista/7 tray items have some way of doing

Fixed Position div Vertical Only

房东的猫 提交于 2019-12-03 12:57:21
问题 I have a current web build with a right sidebar that is a fixed position. I have tried to positioning from the right but don't want it overlapping other divs content. What I am looking for is to have the content scrollable horizontally to the right when it is out of the viewport window. Any help would be greatly appreciated. similarly to this: http://demo.rickyh.co.uk/css-position-x-and-position-y/ however I can not get this working. This has been solved by alternative method. Thanks for

Problem with position absolute in ie7, div moves 10px to the right

喜欢而已 提交于 2019-12-03 12:44:58
ive got a problem on my position absolute property on IE7. My div moves 10px to the right. Below is my code. IE8 and 9 works fine. id menu is the div Im referring. <!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" /> <style type="text/css"> body{margin: 0 0 0 0; padding: 0 0 0 0;} #holder{width: 400px; height: 500px; margin: 0 auto;} #left{float: left; width: 50px; height: 500px; background-color: red;}

get new x/y positions of element after scroll using jQuery

回眸只為那壹抹淺笑 提交于 2019-12-03 12:00:38
问题 Lets say I have an <a> tag as follows: <body> <div class="wrapper"> <a href="#" class="a1">Click Me</a> </div> </body> and my CSS are: body{ padding:10px;} .wrapper { height:1000px; width:500px;} Currently I am using .offset() of Jquery to get the X/Y positions of <a> tag. var offset = $(".a1").offset(); var top = offset.top; var left = offset.left; Now when I scroll the page and check of <a> tag's x,y co-ordinates, they remain the same, i.e. ineffective of page scrolling. I want to get the

position:sticky is not working

落花浮王杯 提交于 2019-12-03 12:00:07
I have this HTML code: <div class="header"> <div class="desc">Description</div> <div class="logo"><img src=""/></div> <div class="navbar"></div></div> .header has a height of 150px. .navbar has a height of 20px. When the user scrolls, I want .navbar to stick at the top. So I went to the CSS and set position:sticky and top:0. But this didn't work. I initially thought that firefox is not supporting position:sticky, but that's not the case because I was able to see a working demo of it. I googled about it but found nothing helpful. Anyone knows why this is not working? SVSchmidt It works fine if

itext multiline text in bounding box

不问归期 提交于 2019-12-03 11:52:46
Does anyone know, how to, in iText, add multiline text in bounding box (with coordinates specified). I tried cb.showTextAligned( PdfContentByte.ALIGN_LEFT, text, bounds.getLeft(), TOTAL_HEIGHT-bounds.getTop(), 0 ); But it does not support newlines. I also tried PdfContentByte cb = writer.getDirectContent(); cb.moveText(300,400); document.add(new Paragraph("TEST paragraph\nNewline")); This supports newlines but does not react to moveText, so I don't know how to put it at given position or better: bounding box. I suspect chunks or PdfTemplate or maybe table might help, but i don't (yet) know how

Find screen position of a QGraphicsItem

感情迁移 提交于 2019-12-03 11:27:09
Use case: This should be a fairly common problem. In a normal QMainWindow with QMdiArea lives an mdiChild with a QGraphicsView. This view displays a QGraphicsScene with QGraphicsItems inside. A right-click at one of these items selects (focusses) the item and opens a context menu, which is conveniently placed at the screen coordinates QGraphicsSceneMouseEvent::screenPos() . This is working as expected. Now I'd like to show the same context menu when the user presses a key (e.g. Qt::Key_Menu). I know the selected (focussed) item, I know the view which displays the scene. So my question is: What