vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=264)
-   -   How Do I Center my Ad? (https://vborg.vbsupport.ru/showthread.php?t=321862)

Aros12 02-17-2016 04:29 PM

How Do I Center my Ad?
 
1 Attachment(s)
I've created an Ad Module towards the top of the main page at: www.hobbysquawk.com that I can't seem to get it to center justify. It defaults to left align...I'm hoping this is an easy fix I am overlooking...

Here's the HTML code in the ad module:

Code:

<center><a href="http://www.motionrc.com/flightlinerc-hawker-sea-fury-1200mm-47-wingspan-pnp/" TARGET="_blank"><img src="http://www.hobbysquawk.com/images/RCG_FlightLineSeaFury2.jpg" target="_blank"></a></img></center>
Here's a screen shot...Any help would be appreciated!

Aros12 02-17-2016 04:34 PM

1 Attachment(s)
Here's what I am looking for the end result to be...Note the margin at the top as well...I would like some space between the light grey top border and the ad itself, while being center aligned.

MarkFL 02-17-2016 04:40 PM

Try adding the following to the template "additional_css.css":

HTML Code:

#widget_158 {
        width: 100% !important;
}


Aros12 02-17-2016 04:47 PM

Thanks Mark! That worked!

Any idea on a top margin? Thanks again!

MarkFL 02-17-2016 04:57 PM

Quote:

Originally Posted by Aros12 (Post 2565125)
Thanks Mark! That worked!

Any idea on a top margin? Thanks again!

Edit the CSS selector I posted to now read:

HTML Code:

#widget_158 {
        width: 100% !important;
        margin-top: 1em;
}

And then you can tweak the "1em" value to get it exactly as you want. :) For example, if you wanted to double it, then put "2em" instead, or if you wanted to halve it, put "0.5em".

Aros12 02-17-2016 05:04 PM

God bless all you CSS gurus! Thanks man, that's just what I needed!

Now since I am striking gold, I thought I would press my luck and see if you know how to make the banners rotational. Right now if I add more than one banner to the ad module, they stack one on top of the other. NOT the desired effect, lol. Is there code that allows me to put multiple banners in the ad module, rank them and have those simply rotate on page refresh?

MarkFL 02-17-2016 05:13 PM

Quote:

Originally Posted by Aros12 (Post 2565128)
God bless all you CSS gurus! Thanks man, that's just what I needed!

Now since I am striking gold, I thought I would press my luck and see if you know how to make the banners rotational. Right now if I add more than one banner to the ad module, they stack one on top of the other. NOT the desired effect, lol. Is there code that allows me to put multiple banners in the ad module, rank them and have those simply rotate on page refresh?

That would likely take some coding. I would do a search here to see if there are any products uploaded to allow rotation of ads. If not, then I would suggest posting a request >>here<< and see if any vB 5.x coders can help you out. :)

Aros12 02-17-2016 05:27 PM

Awesome, thanks again!

shimei 02-17-2016 08:35 PM

Really like your logo and forum styling Aros12. Keep up the great work!

Shim

webmastersun 03-03-2016 10:52 AM

I though your forum was vB4 :D

Code:

#widget_158 {
        width: 100% !important;
        margin-top: 1em;
}

Not ever used this code to align center an image

But seem The OP's question is answered.


All times are GMT. The time now is 06:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01136 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete