Jump to content

[SOLVED] Sticky bar (maybe called scrolling or floating)


Recommended Posts

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

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;

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.

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

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>";
?>

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>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.