Jump to content
Sign in to follow this  
david_hartman

Page alignment

Recommended Posts

david_hartman

Hello, I am working on some custom page templates and seem to be having an issue with one, which I'm trying out using a #container profile in the custom CSS. http://wpdev.sontagfilm.org/ As you can see this method is giving me a page misaligned to the far left.. Any suggestions? Best, David

Share this post


Link to post
Share on other sites
cmunns

Part of the issue is the float applied to that class. I would look into looking at the source code for other sections on the page and follow the HTML formatting with those such as .texture and .content class attached to some inner divs

Share this post


Link to post
Share on other sites
david_hartman

I've tried adjusting the float to all elements on that page.. nothing doing. Checking it with Firebug I could visually get it in position by adjusting the padding but it didn't actually stick. I'm not sure where else to look.. is this a problem with the #container or in the page? I've tried every adjustment I can find. Thanks Adam! Best, David

Share this post


Link to post
Share on other sites
david_hartman

Well.. I was able to fix it by adding margins to the container in the custom CSS box. (code below) HOWEVER, I just realized that every page is not properly aligned in Firefox (though fine in Safari).. What could be the cause of this? Seems like a different issue since its uniform on all pages..? http://wpdev.sontagfilm.org/ Thanks, David

#content_container {
	background-image:url(http://sontagfilm.org/images/chromepaper1.jpg);
	background-repeat:repeat-y;
	width:940px;
	margin:0px 226px;
	padding:0px;
	float: left;
	height:auto;
	}

Share this post


Link to post
Share on other sites
bryan-hadaway

Try: `margin:0px auto 0px auto;` Thanks, Bryan

Share this post


Link to post
Share on other sites
david_hartman

Thanks for the tip Bryan, unfortunately all the pages are still mis-aligned in Firefox- to the left a bit.. http://wpdev.sontagfilm.org/?page_id=53 I've been trying, but I can't isolate where this would be coming from- again, its just in Firefox (Safari is fine)..? Thanks, David

Share this post


Link to post
Share on other sites
cmunns

I just checked in Firefox and I still see inline CSS that says the margin is 240px when you need to set it to margin:0 auto

Share this post


Link to post
Share on other sites
david_hartman

Still not fixed.. The #container added in Custom CSS to create the pages has the margins as suggested by Bryan

margin:0px auto 0px auto;
Then each custom page has the commands for the content / images for that page. Focusing on the home page- here is the code I am using (replaced what I had with the auto margin again.) As you see everything is aligned completely to the left on both Firefox and Safari.. ?? http://wpdev.sontagfilm.org/ Thanks so much guys.. Best, David
<?php get_header(); ?>
	<div id="content_container">
	<div style="float:right; height:1225px; width:431px; margin:0px auto 0px auto; padding:0px; background-image:url(xx-xx.jpg); background-repeat:repeat-y;">
	
	
	
	</div>
	<div style="margin-left:120px; width:330px;">
	<div style="padding-left:33px;">
	</div>[/code]

Share this post


Link to post
Share on other sites
cmunns

You should be adding the width and margin:0 auto to the content container not to the left floated div

Share this post


Link to post
Share on other sites
david_hartman

Ok, I set the margin settings back to 0 in the page and still the whole page is aligned to the far left.

http://wpdev.sontagfilm.org/

I'm not sure what to try next..?? Thanks, David

Share this post


Link to post
Share on other sites
david_hartman

ah.. think i might have sorted it out. i believe it was the

float:left

in the #container seems good on safari and firefox for now! thanks so much for the help guys. best, david

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×