| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Sep 2005 Location: San Diego, California
Posts: 1,078
![]() ![]() ![]() ![]() ![]() | CSS - Confused.. looking for answers Hi What's the difference between margin-top and top? I know margin-top can be used whenever whereas top can only be used if the element is absolutely positioned... but which is more commonly used and why? Also would you recommend using relative positioning for my entire webpage? I will not have anything overlapping but I think if I position everything relatively I can add a footer to the bottom of the page. Pros/cons?
__________________ Ipzy.com - Free Proxy to visit Myspace/Facebook, Tech News, and more! Onlineness.com - Free Proxy FOR SALE: support.im | tradepile.com |
| |
| | #2 (permalink) |
| Buy my domains. Join Date: Feb 2006
Posts: 2,792
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Which one is more commonly used doesn't matter.. it's which one you need to use. Using margin's is better unless you are going to absolute position everything on your layout (or at least a few..) If you use relative positioning for the whole page, adding a footer to the bottom will be hard as you have to add it below everything and the height could change. |
| |
| | THREAD STARTER #3 (permalink) |
| Senior Member Join Date: Sep 2005 Location: San Diego, California
Posts: 1,078
![]() ![]() ![]() ![]() ![]() | Actually I just figured out a very simple way of adding a footer. create a div for header create a div for everything between header and footer (call it container) create a div for footer Make the above three relatively positioned.. then everything inside can be absolutely positioned
__________________ Ipzy.com - Free Proxy to visit Myspace/Facebook, Tech News, and more! Onlineness.com - Free Proxy FOR SALE: support.im | tradepile.com |
| |
| | #4 (permalink) |
| Buy my domains. Join Date: Feb 2006
Posts: 2,792
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | .. You don't know what you're talking about. >_< Using absolutely positioned elements inside relatively positioned elements means the relative ones are useless. Normally, you put the header and footer INSIDE the container. |
| |
| | THREAD STARTER #5 (permalink) |
| Senior Member Join Date: Sep 2005 Location: San Diego, California
Posts: 1,078
![]() ![]() ![]() ![]() ![]() | well yeah but then I also found people having many problems with the footer... the way I talked about actually does work... but only if all the content stuff in the middle is relative too. Actually the regular way probably works too... I am probably doing it a really stupid way but I had to look at my code from a different point of view..
__________________ Ipzy.com - Free Proxy to visit Myspace/Facebook, Tech News, and more! Onlineness.com - Free Proxy FOR SALE: support.im | tradepile.com |
| |
| | #6 (permalink) | ||||||||
| Buy my domains. Join Date: Feb 2006
Posts: 2,792
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | If you put an ABSOLUTE positioned element in ANYTHING, it will go where you have the top and left (and right and bottom) even if it is not inside of the outside element.
????: NamePros.com http://www.namepros.com/programming/171343-css-confused-looking-for-answers.html Again, you don't know what you are saying! | ||||||||
| |
| | THREAD STARTER #7 (permalink) |
| Senior Member Join Date: Sep 2005 Location: San Diego, California
Posts: 1,078
![]() ![]() ![]() ![]() ![]() | I know that absolute positioning puts things according to the top left of the page... however when I did a google search on footer it said you could make a footer by giving it absolute value positioning inside a relatively positioned element. I have discovered that if I made the box containing my main text relative, the footer would always be under it with this code: Code: bottom: 0px;
__________________ Ipzy.com - Free Proxy to visit Myspace/Facebook, Tech News, and more! Onlineness.com - Free Proxy FOR SALE: support.im | tradepile.com |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CSS Relative Root redirect question. | PtViper | Web Design Discussion | 5 | 02-22-2006 08:07 AM |
| CSS help "pain or saint"? | Maylin | Website Development | 5 | 01-05-2006 02:42 PM |
| PHP, Mysql, CSS Coder Needed | weebguy | Web Development Wanted | 1 | 12-27-2005 07:44 AM |
| Converting RedNerve to CSS - Hitting some problems! | will7 | Web Design Discussion | 10 | 12-13-2005 07:45 PM |