Solved

CSS text align issue

Posted on 2013-01-12
5
235 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 38771104
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
ID: 38825509
I've requested that this question be deleted for the following reason:

no contributions provided.  resolved the issue.
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 38825510
What did not work here?
0
 

Accepted Solution

by:
karihaney earned 0 total points
ID: 38833499
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

630 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