View Full Version : How Do I Center my Ad?
Aros12
02-17-2016, 04:29 PM
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:
<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
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":
#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
Thanks Mark! That worked!
Any idea on a top margin? Thanks again!
Edit the CSS selector I posted to now read:
#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
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<< (https://vborg.vbsupport.ru/forumdisplay.php?f=112) 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
#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.
Aros12
03-04-2016, 09:30 PM
Really like your logo and forum styling Aros12. Keep up the great work!
Shim
Thank you!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.