Solved

CSS text align issue

Posted on 2013-01-12
5
222 Views
Last Modified: 2013-02-03
I have a CSS stylesheet problem and I have tried every trick in the book, yes even exhausted google resources, I need to have the content block text-align: left!!!

Here is the code snippet:
the body tag is set to: text-align:center;margin:0 auto;

the content blocks contain the following:
container {width: 1080px;}
#content-container #content {width: 100%;}
#content-container #content #left {float: left; width: 340px; text-align: left;}
#content-container #content #right {float: left; width: 740px; text-align: left;}
.content-background {background:url(../images/common/cont1.png) repeat-y 0 0; margin: auto 0; text-align: left; clear: both;}

Here is the HTML:
    <div id="content">
        <div id="left">
           '''some stuff
        </div>
        <div id="right">
            '''some stuff
        </div>        
    </div>
0
Comment
Question by:karihaney
  • 2
  • 2
5 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
It would have been more helpful to see more of your code together.  

1) You did not have a container div and not sure if it is a class or id
2) You did not have a content-container id which is what your css is calling for.  So either add the content-container div as I did below or change your css from

#content-container #content #left {float: left; width: 340px; text-align: left;}

to

 #content #left {float: left; width: 340px; text-align: left;}

Below works with your current css if you change

container {width: 1080px;}

to

.container {width: 1080px;}

  <div class="container">
  <div id="content-container">
     <div id="content">
        <div id="left">
           '''some stuff
        </div>
        <div id="right">
            '''some stuff
        </div>        
    </div>
    </div>
  </div>
0
 

Author Comment

by:karihaney
Comment Utility
I've requested that this question be deleted for the following reason:

no contributions provided.  resolved the issue.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
What did not work here?
0
 

Accepted Solution

by:
karihaney earned 0 total points
Comment Utility
the only way I was able to get it to work effectively was to remove the align: center; margin: 0 auto; from the code.  The reason I didn't interact with anyone was because I ended up in the hospital, but I am happy to award whatever points you feel is warranted.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now