Minimeallolla Posted November 16, 2010 Share Posted November 16, 2010 say if I had a black page with a background or something simple and it had no content except for a link called "about us" and I wanted that link to be located at the bottom left side of the page but since it has no content its stuck up the top unless <br> or <p> is introduced. how could this be done without spamming <br /><p><br /> untill im happy with its location and if content is added it gets boosted down further with a massive gap >< Quote Link to comment https://forums.phpfreaks.com/topic/218798-or-something-help-simple-and-easy-but-im-lost-lol/ Share on other sites More sharing options...
joomador Posted November 16, 2010 Share Posted November 16, 2010 You need to use CSS, it will solve all your problems. Quote Link to comment https://forums.phpfreaks.com/topic/218798-or-something-help-simple-and-easy-but-im-lost-lol/#findComment-1134751 Share on other sites More sharing options...
Minimeallolla Posted November 16, 2010 Author Share Posted November 16, 2010 I don't really know much css, would you happen to know the code or anyone that could help? I don't really want to read pages and pages of "how to" 's ): Quote Link to comment https://forums.phpfreaks.com/topic/218798-or-something-help-simple-and-easy-but-im-lost-lol/#findComment-1134752 Share on other sites More sharing options...
baccarak Posted November 16, 2010 Share Posted November 16, 2010 you need to use a floating div I think and maybe some javascript, its all down to positioning in the css - I will experiment and look into it. Quote Link to comment https://forums.phpfreaks.com/topic/218798-or-something-help-simple-and-easy-but-im-lost-lol/#findComment-1134785 Share on other sites More sharing options...
baccarak Posted November 16, 2010 Share Posted November 16, 2010 Try This Play around with the margin-top: -7.5em; Credit goes to Cameron Adams http://www.last-child.com/forcing-the-footer-to-always-be-at-the-bottom-of-a-page/ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- html { height: 100%;} body { height: 100%; background-color: #000000; margin: 0px; padding: 0px; } #content { position: relative; min-height: 100%;} * html #content { height: 100%;} #bnav { position: relative; margin-top: -7.5em; color: #FFFFFF; } --> </style> </head> <body> <div id="content"></div> <div id="bnav">About Us </div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/218798-or-something-help-simple-and-easy-but-im-lost-lol/#findComment-1134792 Share on other sites More sharing options...
teedoff Posted November 16, 2010 Share Posted November 16, 2010 if this link is in a ul or ol, which it should be.....you could easily create a style rule on the ul/ol like so: ul {margin-top: 600px;} You cna play around with the pixels, even use percentages. Quote Link to comment https://forums.phpfreaks.com/topic/218798-or-something-help-simple-and-easy-but-im-lost-lol/#findComment-1134798 Share on other sites More sharing options...
baccarak Posted November 17, 2010 Share Posted November 17, 2010 Quote if this link is in a ul or ol, which it should be.....you could easily create a style rule on the ul/ol like so: ul {margin-top: 600px;} You cna play around with the pixels, even use percentages. Cool thanks for the tip, after playing with this, I have found this a very useful techique for future projects Quote Link to comment https://forums.phpfreaks.com/topic/218798-or-something-help-simple-and-easy-but-im-lost-lol/#findComment-1135274 Share on other sites More sharing options...
pengu Posted November 17, 2010 Share Posted November 17, 2010 There is a forum dedicated to these sort of questions. You do realise this is the PHP Coding help forum, right?.. http://www.phpfreaks.com/forums/css-help/ - CSS help. Quote Link to comment https://forums.phpfreaks.com/topic/218798-or-something-help-simple-and-easy-but-im-lost-lol/#findComment-1135296 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.