NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page CSS - Confused.. looking for answers

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 02-25-2006, 08:38 PM THREAD STARTER               #1 (permalink)
JYM
Senior Member
 
JYM's Avatar
Join Date: Sep 2005
Location: San Diego, California
Posts: 1,078
JYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of light
 



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
JYM is offline  
Old 02-25-2006, 09:15 PM   #2 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,792
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
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.
Dan is offline  
Old 02-25-2006, 09:57 PM THREAD STARTER               #3 (permalink)
JYM
Senior Member
 
JYM's Avatar
Join Date: Sep 2005
Location: San Diego, California
Posts: 1,078
JYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of light
 



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
JYM is offline  
Old 02-25-2006, 10:23 PM   #4 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,792
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
.. 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.
Dan is offline  
Old 02-25-2006, 10:48 PM THREAD STARTER               #5 (permalink)
JYM
Senior Member
 
JYM's Avatar
Join Date: Sep 2005
Location: San Diego, California
Posts: 1,078
JYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of light
 



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
JYM is offline  
Old 02-25-2006, 11:42 PM   #6 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,792
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
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.

Quote:
well yeah but then I also found people having many problems with the footer...
Yes, because YOU CAN'T DO IT THAT WAY!

Quote:
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..
The 'regular way' does not exist. You are doing it in a stupid way, because that's not how CSS works. Look up how to position elements.. Never have I heard/seen someone say they need to look at CSS from a different point of view. (Other than when trying to do something not done before..)
????: NamePros.com http://www.namepros.com/programming/171343-css-confused-looking-for-answers.html

Again, you don't know what you are saying!
Dan is offline  
Old 02-26-2006, 01:09 AM THREAD STARTER               #7 (permalink)
JYM
Senior Member
 
JYM's Avatar
Join Date: Sep 2005
Location: San Diego, California
Posts: 1,078
JYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of lightJYM is a glorious beacon of light
 



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;
. I'm probably just bad at describing what I do but so far it is working just the way I want it.. perhaps I did something unnecessary but it is working out...
__________________
Ipzy.com - Free Proxy to visit Myspace/Facebook, Tech News, and more!
Onlineness.com - Free Proxy
FOR SALE: support.im | tradepile.com
JYM is offline  
Closed Thread


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

 
All times are GMT -7. The time now is 02:10 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger