TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 515
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 202
  • Total: 203
  • @rjen

Banner Block Issue

Started by ryu1revline, April 09, 2010, 05:18:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ryu1revline

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.

IchBin

You can center the image using css. background: url(path/to/your/image.jpg) no-repeat top center;

ryu1revline

#2
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.

G6Cad

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 :)

IchBin

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;
}

ryu1revline

Thanks Ichbin, that fixed it perfectly!

Awesome job, problem resolved. :smitten:

This website is proudly hosted on Crocweb Cloud Website Hosting.