centering

Zoomable JScrollPane - setViewPosition fails to update

本秂侑毒 提交于 2019-12-03 09:53:51
问题 I'm trying to code a zoom-able image in a JScrollPane. When the image is fully zoomed out it should be centered horizontally and vertically. When both scroll bars have appeared the zooming should always happen relative to the mouse coordinate, i.e. the same point of the image should be under the mouse before and after the zoom event. I have almost achieves my goal. Unfortunately the "scrollPane.getViewport().setViewPosition()" method sometimes fails to update the view position correctly.

jQuery isotope centering [duplicate]

佐手、 提交于 2019-12-03 09:49:05
Possible Duplicate: How to center DIV in DIV? Please take a look at the image below: How can I make the grey squares horizontally centered inside the red container div? This is all made with isotope, so please keep that in mind. Thanks in advance. Even if the parent (red) div is always aligned in the middle, the grey, smaller ones are not. In the top image, when they are aligned in one single column, that column should be in the exact middle of the wrapper (red) div. Systembolaget It's actually very simple to implement centering for Isotope (just finished a site that does this to look good on

zurb foundation center content in the grid

跟風遠走 提交于 2019-12-03 09:29:24
I'm trying to center horizontally an image into a zurb column but it seems impossible. I tried everything, searched everywhere, but I cant get it to work. Here is my code: <div class="row"> <div class="twelve columns"><br /> <img src="img_06.jpeg" alt="slide image"> </div> </div> currently landscape images are alright on the 12 column grid, but when a portrait image comes along it is on the left side of the grid. If i give it a 25% padding it goest to the center, but I'm using php to pull all the images from a folder and generate the code on the fly, so i can't have 25% padding on all the

How to center images on a web page for all screen sizes

删除回忆录丶 提交于 2019-12-03 09:27:17
I'm having a problem with my HTML. I've searched all over the internet, but still no real answer. I have a website with some images, and I want them to be in the middle. Now, on my screen they're in the middle, but that's because I've put them there by moving them to one side. When my friends to look at it, the image is off-center. Here's the website ; if you are on a 13.5" screen it will look to be in the middle. Would it not be acceptable to use just a simple <center></center> tag? I must be missing something here if not. Feel free to explain why in a comment. I love webdesign and your site

Center unordered list in DIV

余生颓废 提交于 2019-12-03 09:00:36
问题 First of all, I know this question has been asked a MILLION times...and I've looked at this one specifically as well as several others on this site and other sites. I've tried a ton of different variations on each of these and still can't get it to work. I'm trying to center an unordered list. It displays correctly, it's just not centered. At the moment, it's CLOSE to center...but if you change the "width" parameter in the .nav-container code in the CSS then it shifts the position of the div.

How to center links in HTML

天大地大妈咪最大 提交于 2019-12-03 08:50:43
问题 I am really new to HTML and was wondering how you center multiple links with html? I have been trying : <a href="http//www.google.com"><p style="text-align:center">Search</a> But the problem is when I try to put other links behind it for example: <a href="http//www.google.com"><p style="text-align:center">Search</a><a href="Contact Us"><p style="text-align:center">Contact Us</a></p> It just places them on separate lines. I believe this is happening because of the <p> function...but I only

Center Text Larger than Container? (Without using separate child element)

爱⌒轻易说出口 提交于 2019-12-03 06:17:25
Using CSS, it's easy to horizontally center text in a container using text-align:center; , but if any single word of that text is larger than the width of the container, the browser automatically "clips" to the left boundary of the container (as in, the over-sized word aligns with the left side of the too-small container, and without the CSS word-break:hyphenate; property setting (or similar) the over-sized word sticks out past the right edge of the container. Any way to float this pic left of my text here to save vertical space? Oh well. Anyway... Without using a child container element to

Centering bitmap Marker (Google Maps Android API v2)

自闭症网瘾萝莉.ら 提交于 2019-12-03 06:11:37
问题 When I add a marker from a custom Bitmap, the marker is not centered at the point I specify. I'm adding it like this: // ID tramo final int tramoId = tr.getId(); // Nodos final Nodo[] nodos = tr.getNodos(); final PolylineOptions p = new PolylineOptions(); MarkerOptions m = new MarkerOptions(); // Seteamos posicion de linea y marker m.position(semisuma(nodos)); for (final Nodo n : nodos) { p.add(n.getLatLng()); } // Color de linea y marker BitmapDescriptor icon = null; if (tr.getCapacidad() ==

Position div to center of visible area

断了今生、忘了曾经 提交于 2019-12-03 04:38:54
I'm in the midst of making a lightbox style pop-up for a mailing list sign up, but I want the pop-up to position to the center of the visible page, not just the center of the whole document; if the user scrolls to the bottom of the page and clicks to sign up, I want it to appear in the center of the screen. I'm assuming jQuery/JS will be the best way to go for this; here's my current CSS code which works fairly well but the div needs to be pushed down into the visible space dynamically for smaller screens. .my-div{ width:960px; height:540px; position:absolute; top:50%; left:50%; margin-left:

Centering a plot within a fluidRow in Shiny

风流意气都作罢 提交于 2019-12-03 04:34:59
I have a fluidRow with a plot rendered in one of the columns. I would like to know how to center the plot when I have manually specified the plot width via the renderPlot({create plot here}, width = ##) function (thus, it doesn't take up the full width of the column). ui.R code: setwd("C:/Users/Nate/Documents/R Working Directory/appFolder/example") shinyUI(fluidPage( titlePanel("Test"), sidebarLayout( sidebarPanel( p('stuff here') ), mainPanel( tabsetPanel(id = 'tabs1', tabPanel("main", fluidRow( column(8, plotOutput('plot1')), column(4, p('2nd column'))), fluidRow( p("2nd row of viewing area"