Jump to content


Photo
- - - - -

Left Align Entire Website


  • Please log in to reply
8 replies to this topic

#1 lulajack

lulajack

    Member

  • Members
  • PipPip
  • 13 posts

Posted 19 September 2011 - 09:41 AM

Hi there, What I want to do seems relatively simple, yet I cannot find the correct .css to define. I want to left align my entire site i.e. this is my site:http://deeptest.co.za/dekloof/ and I want the text to left align to display like this: http://www.thetestkitchen.co.za/ Is anyone able to help me please?

#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 19 September 2011 - 01:47 PM

The basic markup:

Try this in your custom code CSS:
 
	body {
	text-align:center; /* for IE */
	margin:0 auto; /* for the rest */
	}
	
	div#wrapper {
	text-align:left;
	width:960px; /* or a percentage, or whatever */
	}

Change "wrapper" for the name of your enclosing div around the whole page (if you don't have one, then you need one ;).

Use Firebug to find the appropriate wrapper. In your website, it could be either "site", "page" or "page-canvas" (without quotes ( " ))

#3 lulajack

lulajack

    Member

  • Members
  • PipPip
  • 13 posts

Posted 19 September 2011 - 01:58 PM

Great! Thanks so much. That did half the trick. What needs to happen now is that the backgroudn image needs to be right aligned as it was before... how can I do this? This is what its currently looking like: http://deeptest.co.za/dekloof/ To jog your memory this is how it needs to behave: http://www.thetestkitchen.co.za/ Really appreciate your help :)

#4 lulajack

lulajack

    Member

  • Members
  • PipPip
  • 13 posts

Posted 19 September 2011 - 02:00 PM

I made the width 100% but still does not wrap properly. Left margin still comes into play on a larger monitor...?

#5 Danny

Danny

    Is Awesome!

  • Moderators
  • 15120 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 19 September 2011 - 02:55 PM

Hi Lulajack, Try adding this to Platform Settings --> Custom Code --> CSS Rules #site { background: url("http://deeptest.co.za/dekloof/wp-content/uploads/2011/09/bg11.jpg") no-repeat scroll 100% 100% transparent; } body #page { background-color: transparent !important; }

#6 lulajack

lulajack

    Member

  • Members
  • PipPip
  • 13 posts

Posted 19 September 2011 - 03:04 PM

Thanks Dannyh, but nothing different happened? This is the code I am using: body{ margin-left: 0px; font-size: 87%; line-height:1.6em; height:100%; padding-top: 0px; text-align:center; /* for IE */ margin:0 auto; /* for the rest */ } div#page { text-align:left; margin-left: 0px; width:960px; /* or a percentage, or whatever */ } #site { background: url("http://deeptest.co.za/dekloof/wp-content/uploads/2011/09/bg11.jpg" no-repeat scroll 100% 100% transparent; } body #page { background-color: transparent !important; } Not sure what I am doing wrong... kinda a newbie at css!

#7 Danny

Danny

    Is Awesome!

  • Moderators
  • 15120 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 19 September 2011 - 03:10 PM

Ok, I see what the problem is, first of all can you remove the background image you have uploaded in Design Control. Then, copy this code into your CSS rules section, the code above I gave you had its format slightly altered. http://pastebin.com/8HTnQi35

#8 lulajack

lulajack

    Member

  • Members
  • PipPip
  • 13 posts

Posted 19 September 2011 - 03:14 PM

That worked perfectly! Thanks so much!

#9 Danny

Danny

    Is Awesome!

  • Moderators
  • 15120 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 19 September 2011 - 03:31 PM

No problem, glads its working for you.