I was recently assigned a type of site I haven’t done in quite some time that is required to be 508 compliant. I’ve added the project to my “In Production” projects, and will announce when it is pushed live, But for now I am working on refreshing my knowledge of Section 508 requirements. If only .NET sites were easier to make compliantRead More...
The Frederick Walking Tour website has been moved from “In Production” to “Launched” as of a few minutes ago. I did the HTML/CSS skeleton for the landing page, and am actually quite excited to have been involved in this project. I really would love to see one of these apps made for Gettysburg and would definitely buy itRead More...
A quick project I just worked on launched on Friday morning. The new landing page for CardioSmart.org was put into place to start the redesign of CardioSmart.org. The subpages throughout the site are still within an old design in the Ektron CMS, but the landing page was create to help promote their new NASCAR initiative and an eventual redesign to their site.
I did the HTML/CSS skeleton for this landing page, with minor jQuery customization that was already implemented by a co-worker.Read More...
I am happy to announce the move of a project from “In Production” to “Launched” as of a few minutes ago. I did the HTML/CSS skeleton for the .NET Framework used in APTA’s “PT Now” site, currently in its beta incarnation.Read More...
To center a page vertically and horizontally in HTML is fairly simple. The method below works in all Windows browsers and I believe all Apple browsers, but it has trouble working in Linux browsers from what I’ve seen (I’ve seen it not work for the vertical alignment, only for horizontal, but this could have changed since).
Essentially all you do is:
- Position your container div absolutely.
- Place the top and left positions as 50%.
- Set a height and width (since this is also for centering vertically).
- Set the top and left margins to a negative number that is half the height and width you set. So if your width is 300 pixels, you’d set your margin-left to -150 pixels. If your height is 400 pixels, then set your margin-top to -200 pixels.
margin-left: -450px; /*set to a negative number 1/2 of your width*/
margin-top: -272px; /*set to a negative number 1/2 of your height*/
background: url("/images/ui/splash.jpg") top left no-repeat;
Naturally most people just want to center horizontally, in which case everyone just sets the body tag to text-align center (for IE), and then the container div to margin: 0 auto; (for FF). This is fairly common practice, I’m just including it here for posterity.
margin: 0 auto;