Search Results

Search found 1813 results on 73 pages for 'vertical'.

Page 10/73 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • how to center text vertically in html using css only

    - by stanleyxu2005
    Hi All, i have a very simple html. due to some limitations, i cannot modify the html content. I want to center the text vertically only using css. <html> <head>...</head> <body> <div>Ops, the webpage is currently not available</div> </body> </html> Note that the size of the html can be variable. In additional, if the text cannot be displayed in one line, it should be broken into multiple lines. Is it possible?

    Read the article

  • Align table columns HTML

    - by Luigi Tiburzi
    I finally was able to align the columns in the tables of a page of my website. Though I found the solution I don't understand it. This is a fiddle I prepared. If you delete display: block from the CSS the columns are centered perfectly. The fact is that I don't understand what that instruction is causing problems, doesn't it means that elements are displayed as block elements? Shouldn't it cause the elements (the raw in particular) to fill an entire line? Thanks for your explanation

    Read the article

  • How to make an scrollable UITextField Inside UItableViewCell?

    - by user333624
    Hello everyone. I created a bunch of editable UITableViewCell by embedding an UITextField inside, but I have seen some apps that allows you to scroll the UItableview by scrolling inside an inactive editable cell. How can I do that? And how can I also dismiss the keyboard when tapping somewhere else? I know about the method: - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; if (touch.tapCount == 1) { [self resignFirstResponder]; } else { }} I put it inside my custom table view controller but the method doesn't seem to be called upon a tap, and I don't know if even if it gets called will dismiss the keyboard. Any help will be appreciated.

    Read the article

  • Auto scroll down iframe

    - by tree-hacker
    How can I get an iframe such that when it loads up, it loads up with the page inside scrolled down by a fixed amount (say 100px)? I have so far: <iframe src="http://news.bbc.co.uk/1/hi/uk/7459669.stm" scrolling="no" width=500px height=500px></iframe> but it loads up with the bbc.co.uk page inside at the top left when I actually want it to load up scrolled part way down (that is the page inside the iframe scrolled down, not the page containing the iframe). Anyone know how to do this?

    Read the article

  • Is it possible to write vertically in a textview in android?

    - by Sephy
    LEts say you have a normal textview, with "Stackoverflow" written in it, I would like to know if it it possible to rotate the textview about -90°, to have the S at the bottom and the W at the top of the screen? of course, i could write my text in an image, rotate it and use it that way, but im interested in text right now. thank you

    Read the article

  • Scroll table upwards or downwards using up and down button

    - by Psinyee
    I want to create a banner scrolling function for my homepage. I am not too sure of which programming language to use here. I want to code something similar to: http://www.squidfaceandthemeddler.com/. But I want the footer to remain at the same position while the user scroll the table. Is it possible to get that result? I have create a simple tables and 2 images for the user to click on here is my code for the tables: <div id="banner" style="height:750px; width:600px; overflow:scroll;" > <table width="750px" height="600px"> <tr> <td><a href="sale_1.php"><img src="banner1.png"/></a></td> </tr> </table> <table width="750px" height="600px"> <tr> <td><a href="sale_2.php"><img src="banner2.png"/></a></td> </tr> </table> <table width="750px" height="600px"> <tr> <td><a href="sale_3.php"><img src="banner3.png"/></a></td> </tr> </table> </div> and this is the upwards and downwards button for the scrolling: <table width="750px" height="30px"> <tr> <td align="right"><img src="images/up_arrow.png"/><img src="images/down_arrow.png"/></td> </tr> </table>

    Read the article

  • How do I vertcally align thumbnails of unknown height using jQuery?

    - by playahabana
    Ok, I am a complete beginner to this, in fact I am still building my first website. I am attempting to do this all by hand-coding without a CMS in order to try and learn as much possible as quickly as possible. If this post is in the wrong place I apologise, and a pointer to right place would be appreciated. Here goes, I am trying to peice together a bit of jQuery that will automatically vertically align my thumbnails in my image gallery (they are all different sizes). They are within fixed size div's and the function I am attempting looks something like this: <script type="text/javascript"> $('#ul.photo).bind(function() { var smartVert=$(this); var phty=ob.("ul.photo img").height(); //get height of photos var phtdif=Math.floor(208 - phty); //subtract height of photo from div height var phttop=Math.floor(phtdif / 2); //gets padding reqd. $ob.("ul.photo").css({'padding-top' : phttop}) //sets padding to center thumbnail }); smartVert(); unsurprisingly this doesn't work, if some kindly soul could take pity on a total noob, and point out where I am going wrong (probably in writing complete gibberish would be my first guess) it would be greatly appreciated- even if you could just point me in the direcion of a tutorial regarding these things, I have looked and found one reference that said such a function was easy to create, but it did not elaborate. thankyou in advance

    Read the article

  • complex css image centering help?

    - by Tenshiko
    My problem is a bit more complex than the title says. Sorry, I don't know how to be more specific... I'm working on a website and I came across a part where I should display some thumbnails. The thing is, the thumbnails are not matching in dimensions. (I know, it sounds ridiculous, since this is thumbnails are for, right?) No, there is simply NO WAY to create them in the same dimensions!! I've managed to create a HTML+CSS structure to fix this problem, and the images are not stretching to fit their containers if they are smaller while keeping their aspect ratio. The only issue remaining, is to center the images. Since setting margin to "0 auto" or "auto 0" are not helping, I've tried setting up multiple containers and setting the margins to position the images. This is also not working: if I put a 120x120 picture in a 120x80 inner container, and I set the container's top and left margin to -50%, the margins become -60px both. Can this be fixed? Or is there yet another way to center images? I'm open to any suggestions! HTML: <div id="roll"> <div class="imgfix"> <div class="outer"> <div class="inner"> @if (ImageDimensionHelper.WhereToAlignImg(item.Width, item.Height, 120, 82) == ImgAlign.Width) <!-- ImageDimensionHelper tells me if the image should fit the container with its width or height. I set the class of the img accordingly. --> { <img class="width" src="@Url.Content(item.URL)" alt="@item.Name"/> } else { <img class="height" src="@Url.Content(item.URL)" alt="@item.Name"/> } </div> </div> </div> </div> CSS: .imgfix{ overflow:hidden; } .imgfix .outer { width:100%; height:100%;} .imgfix .inner { width:100%; height:100%; margin-top:-50%; margin-left:-50%; } /*This div (.inner) gets -60px for both margins every time, regardless of the size of itself, or the image inside it*/ #roll .imgfix { width:120px; height:82px; border: 1px #5b91ba solid; } #roll .imgfix .outer { margin-top:41px; margin-left:60px; } /*since I know specificly what these margins should be, I set them explicitly, because 50% got the wrong size.*/ #roll .imgfix img.width { width:120px; height:auto; margin: auto 0; } #roll .imgfix img.height { height:82px; width:auto; margin: 0 auto; }

    Read the article

  • Displaying a list of items vertically in a table instead of horizonally

    - by MichaelMM
    I have a list of items sorted alphabetically: list = [a,b,c,d,e,f,g,h,i,j] I'm able to output the list in an html table horizonally like so: | a , b , c , d | | e , f , g , h  | | i  , j  ,    ,     | What's the algorithm to create the table vertically like this: | a , d , g , j | | b , e , h ,   | | c , f  ,  i  ,  | I'm using python, but your answer can be in any language or even pseudocode. Thanks

    Read the article

  • Line up swing components by edges

    - by rasen58
    Is it possible to line up swing components? The components are in separate panels which both use flow layout. These two panels are in another panel which is using a grid layout. As you can see there is a subtle difference and I find it annoying. I know that all of the jlabels [the rectangles in blue/purple all have the same size, so i think it might be because of the '+' and '*', but I'm not sure because the left sides of the first two boxes aren't lined up. the panels JPanel panel2 = new JPanel(new GridLayout(4, 1)); JPanel panel2a = new JPanel(new FlowLayout()); JPanel panel2b = new JPanel(new FlowLayout()); the first two rectangles (purple) add1 = new JLabel("", JLabel.CENTER); add1.setTransferHandler(new TransferHandler("text")); add1.setBorder(b2); add2 = new JLabel("", JLabel.CENTER); add2.setTransferHandler(new TransferHandler("text")); add2.setBorder(b2); the two blue rectangles textFieldA = new JTextField(); textFieldA.setHorizontalAlignment(JTextField.CENTER); textFieldA.setEditable(false); textFieldA.setBorder(new LineBorder(Color.blue)); textFieldM = new JTextField(); textFieldM.setHorizontalAlignment(JTextField.CENTER); textFieldM.setEditable(false); textFieldM.setBorder(new LineBorder(Color.blue)); the + and * opA = new JLabel("+", JLabel.CENTER); opS = new JLabel("*", JLabel.CENTER); Showing that the rectangles are the same size Dimension d = card1.getPreferredSize(); int width = d.width + 100; int height = d.height + 50; add1.setPreferredSize(new Dimension(width, height)); add2.setPreferredSize(new Dimension(width, height)); mult1.setPreferredSize(new Dimension(width, height)); mult2.setPreferredSize(new Dimension(width, height)); textFieldA.setPreferredSize(new Dimension(width, height)); textFieldM.setPreferredSize(new Dimension(width, height)); Adding to the panels panel2a.add(add1); panel2a.add(opA); panel2a.add(add2); panel2a.add(enterA); panel2a.add(textFieldA); panel2c.add(mult1); panel2c.add(opM); panel2c.add(mult2); panel2c.add(enterM); panel2c.add(textFieldM); panel2.add(panel2a); panel2.add(panel2c);

    Read the article

  • How to achieve Bottom Align floated div that sizes to it's container.

    - by Davy8
    How can I achieve the following layout? Specifically the positioning of Image and DIV I've found that unless I set a specific width for the Div, it will just go on to the next line and take up the full width of the container. Additionally aligning it relative to the bottom of the image is giving me trouble. Currently they're both float:left Edit: The two solutions so far work if the image is a constant width which I guess I could work with, but it's going in a Wordpress theme for an author's profile page and it's possible that images would have slightly variable widths. Is there a solution that would have the Div right next to the image (minus padding) regardless of how wide or narrow the image is? Basically having the div adjust its width to accommodate the image width.

    Read the article

  • Tab Sweep: CDI Tutorial, Vertical Clustering, Monitoring, Vorpal, SPARC T4, ...

    - by arungupta
    Recent Tips and News on Java, Java EE 6, GlassFish & more : • Tutorial - Introduction to CDI - Contexts and Dependency Injection for Java EE (JSR 299) (Mark Struberg, Peter Muir) • Clustering with Glassfish 3.1 (Javing) • Two Way Communication in JMS (Lukasz Budnik) • Glassfish – Vertical clustering with multiple domains (Alexandru Ersenie) • Setting up Glassfish Monitoring – handling connection problems (Jacek Milewski) • Screencast: Developing Discoverable XMPP Components with Vorpal (Chuk Munn Lee) • Java EE Application Servers, SPARC T4, Solaris Containers, and Resource Pools (Jeff Taylor)

    Read the article

  • How do you make a bullet ricochet off a vertical wall?

    - by Bagofsheep
    First things first. I am using C# with XNA. My game is top-down and the player can shoot bullets. I've managed to get the bullets to ricochet correctly off horizontal walls. Yet, despite using similar methods (e.g. http://stackoverflow.com/questions/3203952/mirroring-an-angle) and reading other answered questions about this subject I have not been able to get the bullets to ricochet off a vertical wall correctly. Any method I've tried has failed and sometimes made ricocheting off a horizontal wall buggy. Here is the collision code that calls the ricochet method: //Loop through returned tile rectangles from quad tree to test for wall collision. If a collision occurs perform collision logic. for (int r = 0; r < returnObjects.Count; r++) if (Bullets[i].BoundingRectangle.Intersects(returnObjects[r])) Bullets[i].doCollision(returnObjects[r]); Now here is the code for the doCollision method. public void doCollision(Rectangle surface) { if (Ricochet) doRicochet(surface); else Trash = true; } Finally, here is the code for the doRicochet method. public void doRicochet(Rectangle surface) { if (Position.X > surface.Left && Position.X < surface.Right) { //Mirror the bullet's angle. Rotation = -1 * Rotation; //Moves the bullet in the direction of its rotation by given amount. moveFaceDirection(Sprite.Width * BulletScale.X); } else if (Position.Y > surface.Top && Position.Y < surface.Bottom) { } } Since I am only dealing with vertical and horizontal walls at the moment, the if statements simply determine if the object is colliding from the right or left, or from the top or bottom. If the object's X position is within the boundaries of the tile's X boundaries (left and right sides), it must be colliding from the top, and vice verse. As you can see, the else if statement is empty and is where the correct code needs to go.

    Read the article

  • In subform of a MS Access form, how to hide/show the vertical scroll bars as needed?

    - by PowerUser
    I have a subform in an MS Access form which is not hiding/showing the vertical scroll bars as needed. In the example picture, the vertical scroll bar is showing even though there aren't enough records to warrant vertical scrolling. How do I get the scroll bars to show only when they are needed? Do I need to add an if-then condition to the on_load event? or is there an easier option?

    Read the article

  • How to make BoxLayout vertical but children flow top-aligned?

    - by user291701
    I'm trying to get get a vertical, top-aligned layout to work. This is what I have: JPanel pane = new JPanel(); pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); MyImagePanel panelImage = new MyImagePanel(); panelImage.setSize(400, 400); pane.add(new JComboBox()); pane.add(panelImage); pane.add(new JButton("1")); pane.add(new JButton("2")); pane.add(new JButton("3")); JFrame frame = new JFrame("Title"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(800, 600); frame.add(pane); frame.pack(); frame.setVisible(true); All the controls appear, but it looks like padding is being applied at run time between their tops and bottoms so they're somewhat vertically centered. This is what I'm going for: ----------------------------------------------------- | ComboBox | | ------------ | | | | | Image | | | | | ------------ | | Button 1 | Any additional space fills the right | ------------ | | Button 2 | | ------------ | | Button 3 | | ------------ | | | | Any additional space fills the bottom | | | ----------------------------------------------------- How do I get BoxLayout to do that? Thanks ------------------------- Update ------------------------- Was able to use this: Box vertical = Box.createVerticalBox(); frame.add(vertical, BorderLayout.NORTH); vertical.add(new JComboBox()); vertical.add(new JButton("1")); ... to get what I wanted.

    Read the article

  • In iTextSharp, can we set the vertical position of the pdfwriter?

    - by Pandincus
    Hello, I've recently started using iTextSharp to generate PDF reports from data. It works quite nicely. In one particular report, I need a section to always appear at the bottom of the page. I'm using the PdfContentByte to create a dashed line 200f from the bottom: cb.MoveTo(0f, 200f); cb.SetLineDash(8, 4, 0); cb.LineTo(doc.PageSize.Width, 200f); cb.Stroke(); Now I'd like to insert content below that line. However, (as expected) the PdfContentByte methods don't change the vertical position of the PdfWriter. New paragraphs, for example, appear earlier in the page. // appears wherever my last content was, NOT below the dashed line doc.Add(new Paragraph("test", _myFont)); Is there some way to instruct the pdfwriter that I'd like to advance the vertical position to below the dashed line now, and continue inserting content there? There is a GetVerticalPosition() method -- it'd be nice if there was a corresponding Setter :-). // Gives me the vertical position, but I can't change it var pos = writer.GetVerticalPosition(false); So, is there any way to set the writer's position by hand? Thanks!

    Read the article

  • How can I suppress the vertical gridlines in a ggplot2 plot while retaining the x-axis labels?

    - by Tarek
    This is a follow-on from this question, in which I was trying to suppress the vertical gridlines. The solution, as provided by learnr, was to add scale_x_continuous(breaks = NA), but this had the side effect of also suppressing the x-axis labels, as well. I am totally happy to write the labels back in by hand, but it's not clear to me how to figure out where the labels should go. The other option is to suppress all gridlines (using opts( panel.grid.major = theme_blank()) or some such) and then drawing back in just the major horizontal gridlines. Again, the problem here is how to figure out what the breaks are in the plot to supply to geom_hline(). So, essentially, my options are: Suppress vertical gridlines and x-axis labels (using scale_x_continuous(breaks = NA) ) and add the x-axis labels back in. Suppress all gridlines (using opts( panel.grid.major = theme_blank()) ) and add the major horizontal gridlines back in using geom_hline(). Here are the two options: library(ggplot2) data <- data.frame(x = 1:10, y = c(3,5,2,5,6,2,7,6,5,4)) # suppressing vertical gridlines and x-axis labels # need to re-draw x-axis labels ggplot(data, aes(x, y)) + geom_bar(stat = 'identity') + scale_x_continuous(breaks = NA) + opts( panel.grid.major = theme_line(size = 0.5, colour = '#1391FF'), panel.grid.minor = theme_blank(), panel.background = theme_blank(), axis.ticks = theme_blank() ) # suppressing all gridlines # need to re-draw horizontal gridlines, probably with geom_hbar() ggplot(data, aes(x, y)) + geom_bar(stat = 'identity') + scale_x_continuous(breaks = NA) + opts( panel.grid.major = theme_blank(), panel.grid.minor = theme_blank(), panel.background = theme_blank(), axis.ticks = theme_blank() )

    Read the article

  • The Dangers of Vertical Video; A Public Service Announcement [Video]

    - by Jason Fitzpatrick
    According to the puppets in this tongue-in-cheek PSA, you’d better start shooting your video in the right orientation or very bad things–potentially involving George Lucas–will come to pass. [via Mashable] HTG Explains: What Is Windows RT and What Does It Mean To Me? HTG Explains: How Windows 8′s Secure Boot Feature Works & What It Means for Linux Hack Your Kindle for Easy Font Customization

    Read the article

  • Given a start and end point, how can I constrain the end point so the resulting line segment is horizontal, vertical, or 45 degrees?

    - by GloryFish
    I have a grid of letters. The player clicks on a letter and drags out a selection. Using Bresenham's Algorithm I can create a line of highlighted letters representing the player's selection. However, what I really want is to have the line segment be constrained to 45 degree angles (as is common for crossword-style games). So, given a start point and an end point, how can I find the line that passes through the start point and is closest to the end point? Bonus: To make things super sweet I'd like to get a list of points in the grid that the line passes through, and for super MEGA bonus points, I'd like to get them in order of selection (i.e. from start point to end point).

    Read the article

  • Properly create centered vertical navigation list with a hover image on both sides?

    - by Damainman
    I have a navigation list I placed inside of a , I am attempting to get an image that appears on both sides of a link when you hover. Basically a an arrow on each side of the link. I have managed to get the effect I am looking for with: <ul> <li style=""> <a href="#">Services</a> </li> <li> <a href="#">About</a> </li> <li> <a href="#">Media</a> </li> <li> <a href="#">FAQ</a> </li> <li> <a href="#">Portfolio</a> </li> <li> <a href="#">Contact</a> </li> </ul> .nav ul{ list-style:none; text-align:center; } .nav li:hover a:before, .nav li:hover a:after { content:url(../images/nav_bullet.png); } The end result will look like the following but with the list centered: link >> Hovered Link << link However I am not sure if that is the best way of going about it, and the image is too close to the text. I tried placing a margin and padding but that didn't work. To top of it off, the image is not vertically centered with the link text. Anyone know of a proper way to do this as I am just going by trial and error? Thank you in advance!

    Read the article

  • Can I increase Windows 7 start menu vertical size to let mire items fit in it?

    - by Ivan
    I hate putting shortcuts/files on desktop as well as crawling through "All Programs" menu any frequently (and I only pin some essential every-day applications to the task bar). So, I put all the programs I occasionally use to the start menu itself (above the automatic recently used programs section). But even though I've switched it to use small icons, I run out of vertical space in it (just about 16 shortcuts fit there at maximum).

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >