center

Text Centering Problem Using CSS with IE

I'm working on a site, and am having trouble getting text within a table to appear centered in IE. Firefox 2, 3 and Safari all work fine, but for some reason, the text won't appear centered in IE 6 or 7. I'm using: h2{font:300 12px "Helvetica", serif; text-align:center; text-transform:uppercase;}. I've also tried adding margin-left:...

How can I create a Netflix-style iframe overlay without a huge javascript library?

I'm trying to use a link to open an overlay instead of in a separate popup window. This overlay should consist of a semi-transparent div layer that blocks the whole screen from being clicked on. I also aim to disable scrolling at this point. Not matter where you are on the main page, when the link is clicked, the overlay should be in the...

Open source or free testing solution

Hi, Is there a open source or free suite that can integrate testcases, tests, bugs and possibly the fixes(source code) together. Maintaining the requirements in this system is not a necessity (though, it would be nice to enter a requirement id for each testcase in a custom field). We are a small organization and cannot afford something...

CSS centering tricks

My favorite equation for centering an xhtml element using only CSS is as follows: display:block; position:absolute; width: _insert width here_; left:50%; margin-left: _insert width divided by two & multiplied by negative one here_ There's also the simpler margin:auto method in browsers that support it. Does anyone else have tricky way...

Echo2: How to create a centered Pane?

Hi, I'm new to the Echo 2 framework. I think it should be simple, but I found no way to center the generated content horizontally and vertically. Is there any possibility to get a centered ContentPane (or something similar) with a fixed width and height? thx, André ...

centering text in common lisp

I have a string that I would like to print . Is it possible to center it when printing ? ...

Resources for getting started with MCML?

Can anyone suggest some references or other resources that are useful in learning MCML? I have a small pet project I have been working on for a while using C# and .Net 3.5. I have reached a point where I want to be able to send output from it to Windows Media Center, but I have been having a hard time finding coherent explanations of ho...

Center one of two sibling divs

In the following, I'd like to alter the CSS such that the right-sibling is truly centered in the container div. (Edit: without using absolute positioning). <html> <head> <style type='text/css'> #container { width: 500px; } #left-sibling { float: left; } #right-sibling { text-a...

Two HTML tables side by side, centered on the page

I have two tables on a page that I want to display side by side, and then center them within the page (actually within another div, but this is the simplest I could come up with): <style> #outer { text-align: center; } #inner { text-align: left; margin: 0 auto; } .t { float: left; } table { border: 1px solid black; } #clearit ...

What is the best way to center an html element within its containing element?

Let's say you have the following chunk of code: <div id="container"> <someelement>This is any element.</someelement> </div> What's the best CSS I could use to horizontally center "someelement" within its containing div? ...

How do I center text horizontally and vertical in a TextView in Android?

How do I center text horizontally and vertical in a TextView in Android? So that it appears exactly in the middle of the screen. ...

Centered UL won't expand horizontally in FF/Opera (works in Safari, IE6/7/8)

I have a centered ul (styled like a table ala cssplay) that is having li elements added to it after page render, and it seems to work beautifully in everything but FF and Opera. The desired effect is to have the row of li elements centered even if there's only one or two of them. This example simulates the issue with jQuery adding an li...

C#: Centering controls within a form in .NET (Winforms)?

I'm trying to center a fixed size control within a form. Out of interest, is there a non-idiotic way of doing this? What I really want is something analogous to the text-align css property. At the moment, I'm setting the padding property of the surrounding form to a suitable size and setting the Dock property of the control to fill. ...

Dead Center for JavaScript Output

Hi - I'm going to apologize in advance for how basic this question is, but this is my first time using javascript in html.. Basically, I have a javascript that produces a different bit of random text every time a user loads the page. I'd like to format that text in helvetica and then display it centered in the middle of the page. I'm...

<UL> Centered within a Div

On a design I am coding, there is a horizontal list that serves as the navigation for the site. It spans the entire width of the page. You can see it here: http://aquate.us/film/ Now, the <ul> contained within div#navigation refuses to act centered within the div. It seems to be offset towards the left side. I've searched the net and n...

Frameset won't work in IE8

I have constructed a frameset which is meant to center a webpage in the middle of the browser window. <html> <frameset rows="100%,567px,100%" border="0"> <frame src="blank.html" noresize="noresize" scrolling="yes"> <frameset cols="100%,1128px,100%" border="0"> <frame src="blank.html" noresize="noresize"...

Center a drawn string relative to the window size?

I'm trying to center a string drawn with a ""system", Font.BOLD, 90" font in Java. I've tried (width/2 - (font.size/2 * num_of_chars)) but that didn't work. g2d.setFont(new Font("system", Font.BOLD, 90)); g2d.drawString("Pause", (int) ((800/2) - ((Font.getSize()/2) * 5)),270); ...

LaTeX: centering a table wider than the text column

I'm including a table in my LaTeX document and the centering works fine if the table isn't wider than the text column above it, but when the table is wider, the left side of the table sticks to the left side of the text column, and the additional width of the table is on the right side of the page, how can I center the table? ...

IE6 Centered Content Bug

I have some centered content within a div. It shows up fine in Firefox/Chrome. In IE6 the content expands beyond the div to the entire browser window. Any idea what could be causing this? ...

How to center align a pre tag in HTML

I'm trying to post some code on a blog using the pre tag. Something like this: void function(){return 0;} Now I want all this code to be center aligned. I'm not talking just about the text but also about the border around it. The width is set currently to 60%. So I want all of this to be center aligned. Is there a way to do it? ...