View Full Version : aligning in the center
chase
11-15-2006, 12:46 PM
not sure if this is the right place for this question or not, but i'm having trouble aligning my calendar to the center. i'm new to css, so i'm trying to figure out what change i need to make, and where. the website is here:
http://www.tzpikes.com/testsites/dark_shine/
i want the calendar to appear centered in the column, instead of left aligned.
sorry if this is a dumb question. i searched the forum and didn't find what i was looking for.
ve9gra
11-15-2006, 02:51 PM
I believe this is caused by the .content { float: left; } on line 246 in your css.css file.
I don't have my regular CSS tools accessible right now, so I could be wrong. But I would definitely check it out.
chase
11-15-2006, 03:15 PM
I think you might be right. So here's a stupid CSS/PHP question...I tried to create an inline style to center JUST the calendar (within the "content" div) but it didn't seem to be working:
<p style="vertical-align: middle">
<?php require("../../calendar/calendar.php"); ?>
</p>
This is within my index.php file, but I'm thinking I need to make a change to my CSS file, right?
Brian
11-15-2006, 03:59 PM
You probably want to use a div tag instead of a p tag. Try that and see if that helps.
chase
11-16-2006, 07:52 PM
tried the div tag, and its still not centered. other ideas?
Brian
11-17-2006, 10:15 AM
I believe you are using incorrect HTML.
Try: <div align="center">
chase
11-28-2006, 12:54 PM
Awesome. Fixed it. Now, for some reason, the calendar is aligned in the center of the column, but the arrows to navigate forward and backward months are in the center of the page.
See http://www.tzpikes.com/testsites/dark_shine/
Brian
11-28-2006, 03:51 PM
The float: left; part of your .content CSS is causing this. But removing it breaks other parts of your page.
FWIW, this isn't a calendar issue (the demo.php page appears fine), and the calendar is working as expected. This is a layout issue and, it appears you're trying to do the layout of the page entirely in CSS... This may be a better question for a CSS layout forum...
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.