Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
CSS BG Around Content DIV
Old 10-04-2007, 08:16 PM CSS BG Around Content DIV
Whytey's Avatar
Experienced Talker

Posts: 32
Location: United Kingdom
Trades: 0
[ Temp Host ] http://www.whytey.ihostq.com/impluse

I am trying to put a BG Image around the Content area without overlapping the Nav or Header -

I've 4 IDS:
Container
Banner
Nav
Content


Code:
        #container {
            width: 760px;
            \width: 760px;
            w\idth: 760px;
            margin: 0px;
            margin-left: 23%;
            margin-right: auto;
        }


        body {
            margin-top: 10px;
            padding: 0;
            background: url(images/side_bg.gif) top left repeat-x;
            font-family:Arial, Helvetica, sans-serif;
            color: black;
            height: 135px;
        }

        #banner {
            padding: 0;
            background-image:url(images/impluse_logo.jpg);
            width: 760px;
            height: 160px;
        }
        
        #nav {
            padding: 0;
            background-image:url(images/nav5.gif);
            width: 442px;
            height: 32px;
            margin-top: 1.3%;
            margin-left: 23%
        }

        #content {
            padding-top: 25px;
            padding-bottom: 4px;
            padding-left: 7%;
            background-repeat: repeat-x;
            margin-left: 10%
            width: 85%
        }
        
            
        p, pre {
            letter-spacing: 0.2px;
            line-height: 16px;
            font-size: 12px;
        }
    
        h1 {
            letter-spacing: 1.1px;
        }

It should look something like this



Code:
<div id="container">
      <div id="banner"></div>
       <div id="nav" ></div>
<div id="content">
  <h1 class="text">First Heading</h1>
  <p class="text"></p>
  <p class="text"></p>
  <p class="text"></p>
  <h1 class="text">Second Heading</h1>
  <p class="text"> </p>
<p class="text"> </p>
  </div>
</div>
</div>
What would be the best way to do this?

Thanks
Whytey

Last edited by Whytey; 10-04-2007 at 08:29 PM..
Whytey is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-04-2007, 09:46 PM Re: CSS BG Around Content DIV
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
1 - make the body background the same color as the solid part of the gradient
2 - make a 'container' div (no width set) and make the top gradient a background that only repeats horizontally. You can make it a very small slice of the gradient width-wise, but make it high enough to include the whole gradient to where it turns solid.
3 - create a background image that includes the shadows on the right and left of your main content area, make it small and repeat it vertically.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS BG Around Content DIV
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11978 seconds with 12 queries