SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2009
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Positioning by the book

    Hi....I posted a question about a web site I was making a few weeks ago on sitepoint and got some replies that were very helpful. I am new to web design still in school and I was attempting to build a site with Flash and JS in it. I was told to keep it simple at first and learn how to build a web site right first and then build bigger sites as you go. A couple sitepoint members recommended the book by Ian LLoyd titled Build Your Own Web site The Right Way Using HTML & CSS. I bought it and it's been helpful to me, school teaches you things like what to use but not HOW to use it Anyway my question is about positioning and the box model. I know that absolute positioning is taken from the top left corner of your screen, that being x and y of 0 and measurments get bigger from there. And relative positioning is taken from either the top left corner OR the top left corner of the element your in. As he explains it in the book I can understand it better than anyplace else that explains it. So I put a element wrapped in a div that's x pixels wide and x pixels tall and I have a few words wrapped in a <p> in that element and that <p> is positioned relatively but it's measurements from my experience are taking from the top left corner of my screen is that because the div it's wrapped in is not given a size say 400px wide x 200pxtall? Would relative positioning then be taken from the top left corner of the element? And also when I'm trying tofigure out positioning and padding and margin I'll have Firebug open so I can highlight the element I'm working on and see how the padding and margin settings are affecting the <p> or whatever else it is that I'm working on. You can see the web site I'm working on here http://mesc.solidwebhost.com/index.htm The Request a Bid page has some JS on it that's not working yet but this is not the JS forum and I've talked long enough,I'm just trying to figure out positioning well enough so that any page I build doesn't jump around too much from browser to browser.

  2. #2
    SitePoint Guru Luki_be's Avatar
    Join Date
    Jun 2008
    Location
    Brazil, Minas Gerais. But i'm from Belgium.
    Posts
    867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, you're question is a css question and should be posted in the Css forum

    But to understand how relative, absolute positioning etc works:
    this will give you a clear insight.
    SitePoint Guru
    Sitepoint - the ultimate Css well
    As a computer, I find your faith in technology amusing.
    Sitepoint reference, your friend in need

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2009
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I realized it was in the wrong forum after I already posted it. Thank you for the link to read.

  4. #4
    SitePoint Guru Luki_be's Avatar
    Join Date
    Jun 2008
    Location
    Brazil, Minas Gerais. But i'm from Belgium.
    Posts
    867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No prob :-)
    SitePoint Guru
    Sitepoint - the ultimate Css well
    As a computer, I find your faith in technology amusing.
    Sitepoint reference, your friend in need


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
  •