using body.section-1 class

kdewitt / 2009-05-28 20:59:16   

Hi,

I am trying to have a box of text with a colored background behind it on many pages. I thought I would be able to use the body.section-1 class that exists in the style.css file, but it's not working. There is probably an obvious solution here, but I am stuck at the moment.

The site currently lives at www.katedewitt.com/test

This is how I would like it to look:

http://www.katedewitt.com/test/index.php?/clients/the-queens-museum/

Which I acheived using in-line styles, but when I try with the external style sheet I get:

http://www.katedewitt.com/test/index.php?/clients/the-queens-museumjane-south/

I'd like to be able to change that background color easily across multiple pages, so it would be great to be able to do it from the external style sheet. Any help would be greatly appreciated!

Thank you!

Kate

arsondpi / 2009-05-29 08:19:48   

The text in this page does not seem to be effected from an external style sheet...
Adding <body class="section-1"/> in your text area is wrong... delete that.

ok - let's work on this page as an example...

first go to your style.css file and add something like:

  1. .text1 {
  2. width: 250px; 
  3. padding: 15px 20px;
  4. margin-bottom: 5px;
  5. background: url(http://www.katedewitt.com/test/files/gimgs/15_diagonallines.png); 
  6. }

then get rid of that div with the inline style and enclose your text in a div with a text1 class:

  1. <div class="text1">
  2. <h2>Boing!</h2>
  3. <p>Coocoocatchoo this is your text and it loves you etc</p>
  4. </div>

Suggestions:
-Switch off Process HTML to have access to raw code. Process HTML On adds p and br tags automaticaly.
-Use H tags for headings. You can style them in your style.css page as well.
-notice that I made text1 into a class just so you can have two blocks of text (hence the margin-bottom:5px;). Example: try inserting the same <div class="text1">.... code, twice in your text area... ;-)

kdewitt / 2009-05-29 11:39:16   

Thank you for such a quick response. It totally works -- thank you very much!

How do I switch Process HTML off? I don't see that option...

kdewitt / 2009-05-29 11:49:23   

Oh, I found it :-p

But, I ran into another question: you say to insert the text1 class into my code a second time to create a paragraph break (if I am understanding correctly), but when I do that, it indents both the text and the colored box in from the left as well -- am I missing something here?

Thank you again for all of your help!

kdewitt / 2009-05-29 11:49:51   

Oh, sorry, working here:

http://www.katedewitt.com/test/index.php?/clients/the-queens-museumjane-south/

This thread has been closed, thank you.