Solved

CSS text align issue

Posted on 2013-01-12
5
230 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
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 52

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
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 the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

685 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