Wrox Programmer Forums
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 28th, 2006, 01:21 PM
Registered User
 
Join Date: May 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to nloding Send a message via Yahoo to nloding
Default Extend a border

Alright, here's the problem I'm faced with:

I'm designing a website based of a jpeg graphic the company provided me. There is a menu column on the left (150px), with the main body being the right (700px). Both these are inside a main wrapper div. The main body is it's own div, and each section inside has it's own div (i.e., Mission Statement, News, Events). Each section needs to have a 1px "border" dividing it from the section previous. Here's my existing code:

Code:
body {
  background: #fff;
  font: normal 62.5% "Palatino Linotype","Times New Roman",serif;
  color: #000;
}

#wrapper {
  position: relative;
  width: 850px;
  padding: 5px 5px 5px 5px;
  background: #fff;
  /*border: 1px solid #09507e;*/
  text-align: center;
  z-index: 1;
}

#main-body {
  text-align: left;
  margin: 0 0 0 150px;
  padding: 0 0 0 10px;
  border: 1px solid #09507e;
  border-right: 0;
}

#mission-statement p {
  font-size: 1.3em;
}

#events {
  border-top: 1px solid #09507e;
  clear: right;
}

#news {
  border-top: 1px solid #09507e;
}
Therefore, the main body div has a top, left, and bottom border, and that works SWEET. Exactly what they wanted. Then the News and Events divs have a 1px border at the top ... Now to the problem:

The border-top of News and Events doesn't extend all the way to the left border of the main body div. The company execs ABSOLUTELY have to have those connect. There is currently a 3-5px space between the left border and the top border of the sub-divs. I assume this is from the padding.

What's the best to way to "extend" that border so that they connect? I'm trying to avoid using an image for the border. I have screenshots, but can't figure how to post images ....

THANKS!

--Nathan

 
Old September 1st, 2006, 08:43 PM
Authorized User
 
Join Date: Jan 2006
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there,

Have you tried applying a negative left margin to your sub-divs?





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to extend classes hafizmuhammadmushtaq Java Basics 1 April 8th, 2008 02:45 AM
how to extend the String class hafizmuhammadmushtaq Java Basics 2 April 7th, 2008 06:21 AM
Extend Autosuggest control [email protected] BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 May 27th, 2006 03:08 AM
Cannot implement or extend Rusk Apache Tomcat 1 June 16th, 2004 06:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.