5 replies [Last post]
euroyankee
Offline
newbie
Last seen: 13 years 11 weeks ago
Joined: 2007-08-02
Posts: 3
Points: 0

Greetings from rainy Germany. This must be one of the most basic questions, but this is my first ever web page and I've been searching for the answer all morning and can't find a solution:

I want to put a thin 1 px white border on each side of my 800px page-container. If I try to change the width to 798px, or change it to 100% and set widths for other elements, things start collapsing. The #lang-nav is an example of the borders I want to run left and right along the entire page container.

My style sheet is attached. Thanks in advance for your help.

AttachmentSize
euroyankee_stylesheet.txt1.68 KB
Phreestyle
Phreestyle's picture
Offline
Enthusiast
Australia
Last seen: 4 years 40 weeks ago
Australia
Timezone: GMT+8
Joined: 2007-05-12
Posts: 235
Points: 6

Can you post your markup?

Can you post your markup? Or, better yet, a link to a working copy?

Life's a journey. Enjoy the trip.

euroyankee
Offline
newbie
Last seen: 13 years 11 weeks ago
Joined: 2007-08-02
Posts: 3
Points: 0

the html

Here's the markup. Unfortunately I'm only to the point of working on the basic design and haven't managed to get anything online. Thanks.

AttachmentSize
euroyankee_html.txt 2.05 KB
Phreestyle
Phreestyle's picture
Offline
Enthusiast
Australia
Last seen: 4 years 40 weeks ago
Australia
Timezone: GMT+8
Joined: 2007-05-12
Posts: 235
Points: 6

Can't you just add the

Can't you just add the border elements to your existing code. Eg

#page-container { width: 800px; margin: auto; background: #FFFFFF; border: 1px solid #eee; border-width: 0px 1px; }

This works for me - ie, adding a border to the right and left sides of the page-container elements.

Life's a journey. Enjoy the trip.

euroyankee
Offline
newbie
Last seen: 13 years 11 weeks ago
Joined: 2007-08-02
Posts: 3
Points: 0

it works!

My problem has been solved. I tried phreestyle's border code but my blue background still collapsed into my white banner. So I concluded that there must be something wrong with how I had inserted the image into the banner. Sure enough, took the image out of the banner and the page-container borders work exactly as they should. Thanks & cheers.

Phreestyle
Phreestyle's picture
Offline
Enthusiast
Australia
Last seen: 4 years 40 weeks ago
Australia
Timezone: GMT+8
Joined: 2007-05-12
Posts: 235
Points: 6

Glad you got it working as

Glad you got it working as you wanted.

Life's a journey. Enjoy the trip.