TinyPortal

Development => Support => Topic started by: ryu1revline on April 09, 2010, 05:18:37 AM

Title: Banner Block Issue
Post by: ryu1revline on April 09, 2010, 05:18:37 AM
Hello everyone!  :)

I have my banner in a 'front-panel' HTML block, with a size of 1280px width and 323px height. It looks great in a resolution of 1920 by 1080, but anything smaller pushes the banner (and my right border) off the screen.

The question, how can I keep it centered for those who use smaller resolutions? Is there a way to bring up a scroll bar for windowed browsers instead of pushing the right border further away?

Thanks for the help.
Title: Re: Banner Block Issue
Post by: IchBin on April 09, 2010, 05:59:52 AM
You can center the image using css. background: url(path/to/your/image.jpg) no-repeat top center;
Title: Re: Banner Block Issue
Post by: ryu1revline on April 09, 2010, 06:49:12 AM
Thanks for the response.

I followed your instructions but my banner image still pushes to the right. I'm sure somewhere in my code I've made a mistake. Here is the CSS code:

#banner {
   position: relative;
   top: 0;
   left: 0;
   display: block;
   width: 1280px;
   height: 323px;
   background: url(http://img149.imageshack.us/img149/8861/banner5s.jpg)no-repeat top center;
}

And here is the HTML code:

<div id="banner"><a href="mybanner"></a></div>

Thanks for helping out.
Title: Re: Banner Block Issue
Post by: G6Cad on April 09, 2010, 09:42:33 AM
I think your issue here are becaause of a bug descoverd and fixed for the updatepackage Bloc hopefully release this weekend.
If you look at your code you have a mix of html and BBC code, that error comes from using the editor when pasting code in it, it render wrong. Luckily it's a bug that Bloc have fixed in the update package :)
Title: Re: Banner Block Issue
Post by: IchBin on April 09, 2010, 02:40:17 PM
The BBC tags is because he didn't use a code tag to surround his code G6. It has nothing to do with the bug you referred. He's just trying to get a background centered.

Try this as your CSS instead.
#banner {
   display: block;
   height: 323px;
   background: url(http://img149.imageshack.us/img149/8861/banner5s.jpg)no-repeat top center;
}
Title: Re: Banner Block Issue
Post by: ryu1revline on April 09, 2010, 04:10:06 PM
Thanks Ichbin, that fixed it perfectly!

Awesome job, problem resolved. :smitten: