View Full Version : Help Changing header ad code.
SPEEDKILLZ
03-06-2014, 01:05 AM
Ok so i am trying to get an ad below the welcome box. When i enter the ad in header2 it looks like 1st image.
Then when i add this code .ad_global_header {
float:{vb:stylevar right};
margin-right:25px !important;
}
#ad_global_header1 {
float:{vb:stylevar left};
padding:0px !important;
margin:0px !important;
}
#ad_global_header2 {
float:{vb:stylevar left};
padding:0px !important;
margin:0px !important;
} to additional.css it looks like 2nd image. How can i move it down and left and right?
Thanks
bzcomputers
03-06-2014, 02:04 AM
You will just need to change the last line under #ad_global_header2 from:
margin:0px !important;
to something like:
margin:50px 0px 0px 0px !important;
This will give you a top margin of 50px. Adjust as necessary.
See below for additional tweaking left and right.
This may help you better understand CSS for margins:
http://www.w3schools.com/css/css_margin.asp
The margin property can have from one to four values.
margin:25px 50px 75px 100px;
top margin is 25px
right margin is 50px
bottom margin is 75px
left margin is 100px
margin:25px 50px 75px;
top margin is 25px
right and left margins are 50px
bottom margin is 75px
margin:25px 50px;
top and bottom margins are 25px
right and left margins are 50px
margin:25px;
all four margins are 25px
P.S. You can also use negative numbers. This comes in handy if a previously set margin containing the element you are trying to move is stopping you from placing it where you want.
SPEEDKILLZ
03-06-2014, 02:45 AM
You will just need to change the last line under #ad_global_header2 from:
margin:0px !important;
to something like:
margin:50px 0px 0px 0px !important;
This will give you a top margin of 50px. Adjust as necessary.
See below for additional tweaking left and right.
This may help you better understand CSS for margins:
http://www.w3schools.com/css/css_margin.asp
P.S. You can also use negative numbers. This comes in handy if a previously set margin containing the element you are trying to move is stopping you from placing it where you want.
Thank you for a great tut. But it dont matter how i change or what numbers i put in it does not change the location of the ad. Any chance of being hard coded or settings somewhere else?
bzcomputers
03-06-2014, 03:12 AM
Thank you for a great tut. But it dont matter how i change or what numbers i put in it does not change the location of the ad. Any chance of being hard coded or settings somewhere else?
Without access to test on it myself I can give you a few other things to try...
Change the padding instead of the margin:
#ad_global_header2 {
float:{vb:stylevar left};
padding:50px 0px 0px 0px !important;
margin:0px !important;
}
Instead of a top-margin of 50px try a negative bottom margin of 50px:
#ad_global_header2 {
float:{vb:stylevar left};
padding:0px !important;
margin:0px 0px -50px 0px !important;
}
You could try changing the stylevar for #ad_global_header2 from left to right:
#ad_global_header2 {
float:{vb:stylevar right};
padding:0px !important;
margin:50px 0px 0px 0px !important;
}
If you get any movement with those report back.
SPEEDKILLZ
03-06-2014, 03:20 AM
Thank you but 0 movement at all. After i insert the code it goes and stays lol
--------------- Added 1394079978 at 1394079978 ---------------
ok odd but i figured it out. I did away with the two bottom sections of code and went with
.ad_global_header {
float:{vb:stylevar right};
margin:35px 10px 0px 0px !important;
}
and i worked. Make sense?
Also is there a way to move the "remember me" text and box?
--------------- Added 1394082959 at 1394082959 ---------------
Edit: Got the remember me moved thanks to Lynne 4 years ago lol
https://vborg.vbsupport.ru/showthread.php?t=231817&highlight=remember+me
bzcomputers
03-06-2014, 04:50 AM
Thank you but 0 movement at all. After i insert the code it goes and stays lol
--------------- Added 1394079978 at 1394079978 ---------------
ok odd but i figured it out. I did away with the two bottom sections of code and went with
.ad_global_header {
float:{vb:stylevar right};
margin:35px 10px 0px 0px !important;
}
and i worked. Make sense?
Also is there a way to move the "remember me" text and box?
--------------- Added 1394082959 at 1394082959 ---------------
Edit: Got the remember me moved thanks to Lynne 4 years ago lol
https://vborg.vbsupport.ru/showthread.php?t=231817&highlight=remember+me
Glad you got it working. The only issue with removing the code you did is if you want to place more than one ad in header in the future and need to move it around separately from the other.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.