SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jan 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css - page layout help

    Greeting.

    I am having trouble making a page with 3 evenly sized columns made with layers and CSS.

    Please take a look at this page
    http://www.brainworks.co.nz/zerowaste/newsletter1.htm

    I'm not too sure what I'm doing wrong. If anyone can offer advise- I would be most greatful.

    Antonhttp://www.brainworks.co.nz/zerowaste/newsletter1.htm

  2. #2
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It worked in IE5 didn't it? That browser interpreted the spec incorrectly. What IE5 did was subtract the padding from the width and added the margins on the outside. The correct what according to the W3C is to add width and padding, instead of subtract. Does that make since?

    In any event, just do a little of the math before hand and subtract the padding you want from the width when you write it out.
    Code:
    instead of:  width: 300px; padding: 10px;
    go for: width: 280px; padding: 10px;
    Or better yet, use the float property to arrange your columns. :-)

    ~~Hope This Helps

  3. #3
    busy Steelsun's Avatar
    Join Date
    Mar 2001
    Location
    Houston, Tejas; Future Capital of the World
    Posts
    2,474
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice looking page coming along there.

    You would think that since CSS is the 'new' thing for formatting, they would make it easier to use and have less arcane things like adding or subtracting of sizes prior to implementation.

    I guess that's why I'm not that good at it yet.
    Brian Poirier
    SunStockPhoto: Stock Photos, Fine Art Photos, Event Photography


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •