[SOLVED] CSS wrapper affecting body

This is a discussion on "[SOLVED] CSS wrapper affecting body" within the Web Page Design section. This forum, and the thread "[SOLVED] CSS wrapper affecting body are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Dec 31st, 2007, 01:26
Junior Member
Join Date: Aug 2006
Location: UK Sussex
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] CSS wrapper affecting body

I am doing a website for a friend as a favour, so I thought I would experiment with external CSS style sheets. I’m very new to this technique.

I have tried to avoid using tables and try to do the whole layout in a CSS wrapper,

The problem is that the body text seems to be affected by the wrapper, so that I can’t align the text left or give the text a margin. However within the html the <div id="content"> tag needs to be within the <div id="wrapper"> in order to nest within the layout which the wrapper produces.

In a nut shell I can’t control the body text on its own. All text on the page is affected by the wrapper including the navigation.

It could be that something in the CSS isn’t working, or a DIV is in the wrong place?
Or the way the CSS links up, or the way each CSS rule is named?

http://www.fireintheholeproductions.com/

http://www.fireintheholeproductions....heholemain.css

I hope this makes some sense?

Many thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Dec 31st, 2007, 05:53
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS wrapper affecting body

I'm guessing you didn't hand code the CSS? There appears to be no organization in there and a number of errors

I don't quite understand what exactly you're having issues with, though. Are you expecting the text inside the wrapper divider to go farther left to the side of the window? You have it set to 85% width, so it won't do that. Or are you saying you cannot figure out how to target the text to style it the way you want. Anyway, glad to hear you're going the external style sheet route. You're HTML looks nice and lean!

If you can clarify a bit more, it'll be easier to help you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Dec 31st, 2007, 08:33
Junior Member
Join Date: Aug 2006
Location: UK Sussex
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS wrapper affecting body

Thanks for reply. I have used samples from many tutorials, so it isn’t all hand coded.

Quote:
Or are you saying you cannot figure out how to target the text to style it the way you want?
Yes I would like the text to have a margin, maybe 6px, and not go right against the red border which the wrapper is making. And you see the way the body text is aligned central…I would like it to just align left.
Also I do not want the effect the navigation…I want to differentiate two styles body and navigation.


I was hoping this part of the CSS code would effect the body text? Some element to this work such as the font size. But no matter how much padding I put in, nothing will happen. Also the align left, is being overrule by the wrapper?

There is another question about the HTML, I was wondering if <div id="content"> is the correct name of the DIV, if I want to control the body text? I am assuming this code is affect the body?

html, body {margin: 12;
padding: 4;
width: 100%;
height: 100%;
background-color:#000000;
color:#D1D1D1;
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 12pt;
text-align: left;
}


Hope this is clearer?

Last edited by Joolsd186; Dec 31st, 2007 at 08:35.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Dec 31st, 2007, 09:40
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS wrapper affecting body

<stuck record>

Validate your HTML.
Validate your CSS.

</stuck record>

You need to learn about CSS specificity. For example, if you have two rules like this:

Code: Select all
#wrapper { text-align: center }
html, body { text-align: left }
...then all the text within #wrapper will be aligned to the centre. The "#" ID has greater specificity, so that rule takes precedence.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Dec 31st, 2007, 11:12
Junior Member
Join Date: Aug 2006
Location: UK Sussex
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS wrapper affecting body

I have taken out all the align rules. All the text including the navigation looks as if it is aligned left.

The wrapper is overriding the body, With the CSS specificity. I have read through this web I am not yet sure how to link specifically to a attribute. I will need time to try a few things.

Also I will first fix those errors.

Last edited by Joolsd186; Dec 31st, 2007 at 11:19.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Dec 31st, 2007, 12:21
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS wrapper affecting body

I'm a little confused however that's not unusual.
Can you just add some padding to your #content?

I do not see #content in your css but see it in your html

Code: Select all
#content {
padding: 6px;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Dec 31st, 2007, 13:09
Junior Member
Join Date: Aug 2006
Location: UK Sussex
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS wrapper affecting body

Quote:
Can you just add some padding to your #content?

I do not see #content in your css but see it in your html

Code: Select all#content {
padding: 6px;
}

That worked straight away, some interesting things are happening. I took away the html, body {margin: 12; rule. (not sure if it was doing much) In Mozilla the background looks white, but this is more promising than it was.

It's still a long way short, I will probably have a few questions in the new year.
Off to a new year party now.

Have a good new year!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Dec 31st, 2007, 19:11
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,788
Thanks: 0
Thanked 16 Times in 16 Posts
Re: CSS wrapper affecting body

Thread marked as Solved.
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrapper problem goldy Web Page Design 2 May 30th, 2008 19:11
[SOLVED] CSS role over affecting HREF, links Joolsd186 Web Page Design 10 Jan 9th, 2008 00:26
[SOLVED] Aplying back ground image/s to body Oak Web Page Design 3 Jan 6th, 2008 19:55
Background Opacity without affecting Text ChrisTheSoul Web Page Design 11 Aug 31st, 2007 14:11
CSS not affecting document properly, please help! natemorris1 Web Page Design 9 Jul 25th, 2005 22:23


All times are GMT. The time now is 01:28.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42