SPraus Posted April 5, 2009 Share Posted April 5, 2009 Hey guys, Im sory that im not quite clear but i have an example for you http://theacesofwar.com/cgi-local/BossCart.cgi?pagenum=1&dbname=/cgi-local/boss_maindb&company=aso The bar at the bottom containing the shopping cart floats as you scroll down the page, I am trying to do something like that (im renevating that page for a friend therefore its not functional) but id perfer not to have to do frames, What I have been trying is at: http://www.theacesofwar.com/new/ Keep in mind this is still in design and coding phases so it looks horible but if you can help I would really apperciate it. Thank You, SPraus Link to comment https://forums.phpfreaks.com/topic/152687-solved-sticky-bar-maybe-called-scrolling-or-floating/ Share on other sites More sharing options...
thebadbad Posted April 5, 2009 Share Posted April 5, 2009 You should be able to create an absolute positioned div fixed to the bottom of the page: <div style="position: absolute; bottom: 0; margin: 0 auto;">Shopping cart</div> Edit: You could also look into position: fixed; Link to comment https://forums.phpfreaks.com/topic/152687-solved-sticky-bar-maybe-called-scrolling-or-floating/#findComment-801826 Share on other sites More sharing options...
SPraus Posted April 5, 2009 Author Share Posted April 5, 2009 Ok that almost fixed it but not working with IE at all (works in Firefox, and chrome) any help is apperciated Link to comment https://forums.phpfreaks.com/topic/152687-solved-sticky-bar-maybe-called-scrolling-or-floating/#findComment-801837 Share on other sites More sharing options...
corbin Posted April 5, 2009 Share Posted April 5, 2009 Works fine in IE 8 for me. What version of IE are you using? Try using it alone and see if it still doesn't work. It could be something else on the page messing it up. Link to comment https://forums.phpfreaks.com/topic/152687-solved-sticky-bar-maybe-called-scrolling-or-floating/#findComment-801841 Share on other sites More sharing options...
thebadbad Posted April 5, 2009 Share Posted April 5, 2009 What's not working? The centering or positioning? If you add text-align: center; to the parent element (e.g. body) and then text-align: left; to the div, the div should be centered in IE too. Note: I've given up IE6 long ago, and don't bother coding for it any more. IE7 and 8's rendering is often acceptable though. Link to comment https://forums.phpfreaks.com/topic/152687-solved-sticky-bar-maybe-called-scrolling-or-floating/#findComment-801842 Share on other sites More sharing options...
SPraus Posted April 5, 2009 Author Share Posted April 5, 2009 Ok i have IE 8 and i had to use position:fixed to get it the way i wanted it on chrome and firefox http://www.theacesofwar.com/new/view_products.php?company=aso thats the actual link to the one im currently looking at Sorry i know its kinda a pain but thanks for the help Link to comment https://forums.phpfreaks.com/topic/152687-solved-sticky-bar-maybe-called-scrolling-or-floating/#findComment-801843 Share on other sites More sharing options...
thebadbad Posted April 5, 2009 Share Posted April 5, 2009 You could start with correcting your syntax errors. You're missing double quotes around each and every HTML attribute value. Link to comment https://forums.phpfreaks.com/topic/152687-solved-sticky-bar-maybe-called-scrolling-or-floating/#findComment-801853 Share on other sites More sharing options...
SPraus Posted April 5, 2009 Author Share Posted April 5, 2009 well im not missing them because php wont let me do echo("<a href= "http://www.google.com">)"; lol Link to comment https://forums.phpfreaks.com/topic/152687-solved-sticky-bar-maybe-called-scrolling-or-floating/#findComment-801875 Share on other sites More sharing options...
thebadbad Posted April 5, 2009 Share Posted April 5, 2009 Um, yes, you are missing them. It's just a matter of constructing the code properly: <?php $var = 'gle'; echo '<a href="http://google.com">Goo' . $var . '</a>'; ?> as I prefer. Or escape the quotes: <?php $var = 'gle'; echo "<a href=\"http://google.com\">Goo$var</a>"; ?> Link to comment https://forums.phpfreaks.com/topic/152687-solved-sticky-bar-maybe-called-scrolling-or-floating/#findComment-801890 Share on other sites More sharing options...
SPraus Posted April 6, 2009 Author Share Posted April 6, 2009 Well guys i figured it out, add this code just incase your in the same problem. <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd> <head> </head> <html> <body> Your body goes here!!! and the style stuff can be moved into the head section! <style type="text/css"> #footer {display:block; bottom:0px; left:0px; width:100%; position:fixed;text-align:center; font-weight:bold;} </style> <div id=footer> <img src=../images/img0003.gif id=Shape3 align=top alt= title= border=0 width=100% height=20> </div> </body> </html> Link to comment https://forums.phpfreaks.com/topic/152687-solved-sticky-bar-maybe-called-scrolling-or-floating/#findComment-801903 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.