Be a Supporter!

DIv / Width / Style help..

  • 381 Views
  • 5 Replies
New Topic Respond to this Topic
West-End-Pro
West-End-Pro
  • Member since: Feb. 15, 2006
  • Offline.
Forum Stats
Member
Level 24
Blank Slate
DIv / Width / Style help.. 2006-12-04 16:06:31 Reply

I'm trying to make a website without using any tables at the moment, and I appear to have got stuck with a combination of divs, width and style. What I'm trying to do is make a black border around the site with a width of 800..but i'm not sure how to do this...

I'm sure it requires divs and width, and then the style, but i'm not sure how =[ I've managed to get the border around the whole centering div but i just can't get it around the bits which i need...

Any help would be appreciated....

OneWhoListens
OneWhoListens
  • Member since: Aug. 23, 2006
  • Offline.
Forum Stats
Member
Level 27
Blank Slate
Response to DIv / Width / Style help.. 2006-12-04 17:32:05 Reply

You mean a border around the whole page?


"Sit down and shut up and do as I say" -- Zeus

BBS Signature
Gutya
Gutya
  • Member since: Nov. 27, 2006
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to DIv / Width / Style help.. 2006-12-04 18:02:10 Reply

A width of 800 what? Pixels? That would leave no room for content.

And it would help if you posted the code you ahve so that we can show you how to fix your problems.

Jessii
Jessii
  • Member since: Feb. 10, 2005
  • Offline.
Forum Stats
Member
Level 36
Movie Buff
Response to DIv / Width / Style help.. 2006-12-04 18:26:12 Reply

IF you want a border around the whole page, it'd be

body {border:1px solid #000000; width:800px;}

The width sets the width of the body so that it's like your container so the other divs don't fall off of the page. I don't recommend using 800px wide because it's gonna go off of your page by at least 25px.

West-End-Pro
West-End-Pro
  • Member since: Feb. 15, 2006
  • Offline.
Forum Stats
Member
Level 24
Blank Slate
Response to DIv / Width / Style help.. 2006-12-05 03:05:07 Reply

At 12/4/06 05:32 PM, OneWhoListens wrote: You mean a border around the whole page?

No i mean a border around a div which has a width of 800 px

At 12/4/06 06:02 PM, Gutya wrote: A width of 800 what? Pixels? That would leave no room for content.

Yes it would. I've managed to get it working around a table with a width of 800, as you can see here...But what I really need is how to apply it around a div which will have the site in...You can see the code for the site here (with tables)

At 12/4/06 06:26 PM, Jessii wrote: IF you want a border around the whole page, it'd be

body {border:1px solid #000000; width:800px;}

The width sets the width of the body so that it's like your container so the other divs don't fall off of the page. I don't recommend using 800px wide because it's gonna go off of your page by at least 25px.

I thought that the page was 1000px wide?

In short, if you look here this is basically what I want instead of having to use tables...

So, can any one help?

Sorry I didn't explain properly in the first post =[
Jessii
Jessii
  • Member since: Feb. 10, 2005
  • Offline.
Forum Stats
Member
Level 36
Movie Buff
Response to DIv / Width / Style help.. 2006-12-05 07:27:55 Reply

At 12/5/06 03:05 AM, West-End-Pro wrote: I thought that the page was 1000px wide?

You want to keep it 800px max for those who still use 800px screen resolutions but you can change it to 1000px if you want, it's up to you but a lot of people don't like horizontal scrolls

In short, if you look here this is basically what I want instead of having to use tables...

Just put border: 1px solid #000000; in your div style and you'll have a border.