3 replies [Last post]
mrpainter
Offline
newbie
Last seen: 15 years 19 weeks ago
Joined: 2004-08-01
Posts: 2
Points: 0

Hello,
I'm hoping someone can help. I have a blog that has a custom banner that I would like to have its position fixed, so that when a visitor scrolls down the page the content scrolls under the banner. How would I do this? The link to the banner is located in the body of the index page as such: <div id="banner">
<img width="100%" border="0" src="http://homepage.mac.com/justinmcgonigle/.Pictures/custombanner/bannerV.gif"
/> </div> and it works great but not fixed. The site in question can be found here: http://homepage.mac.com/justinmcgonigle/iblog/B1726909080/index.html
I tried to change this in the .css within the #banner section but I can't seem to resolve it. The .css can be found here: http://homepage.mac.com/justinmcgonigle/iblog/B1726909080/styles-site.css
Thanks for the help and I look forward to a possible answer......Smile

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 48 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Fixed Banner Position?

Hi mrpainter,

This is a really good link on fixing positions, it may help!

http://devnull.tagsoup.com/fixed/

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mrpainter
Offline
newbie
Last seen: 15 years 19 weeks ago
Joined: 2004-08-01
Posts: 2
Points: 0

Fixed Banner Position?

Thanks Hugo. Didn't do the trick as it were. There must be a way to simply define a banner in the .css and have it fixed, no? I can't seem to figure it out. I'm on a Mac btw.......

Stu
Stu's picture
Offline
Enthusiast
Bristol uk
Last seen: 15 years 46 weeks ago
Bristol uk
Joined: 2004-01-20
Posts: 282
Points: 0

Fixed Banner Position?

Only IE doesn't recognise position:fixed but it can be made to work using a html/body height of 100%.
http://www.stunicholls.myby.co.uk/layouts/body2.html

Should be adaptable to your needs.

It's not what you do it's the way that you do it.
So do it with STYLE
http://www.s7u.co.uk