Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-06-2014, 01:05 AM
SPEEDKILLZ SPEEDKILLZ is offline
 
Join Date: Feb 2011
Location: USA
Posts: 641
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help Changing header ad code.

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
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
Attached Images
File Type: jpg no code.jpg (57.0 KB, 0 views)
File Type: jpg code.jpg (69.2 KB, 0 views)
Reply With Quote
  #2  
Old 03-06-2014, 02:04 AM
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Location: TX
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You will just need to change the last line under #ad_global_header2 from:
Code:
margin:0px !important;
to something like:
Code:
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
Quote:
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.
Reply With Quote
Благодарность от:
tbworld
  #3  
Old 03-06-2014, 02:45 AM
SPEEDKILLZ SPEEDKILLZ is offline
 
Join Date: Feb 2011
Location: USA
Posts: 641
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bzcomputers View Post
You will just need to change the last line under #ad_global_header2 from:
Code:
margin:0px !important;
to something like:
Code:
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?
Reply With Quote
  #4  
Old 03-06-2014, 03:12 AM
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Location: TX
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SPEEDKILLZ View Post
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:
Code:
#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:
Code:
#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:
Code:
#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.
Reply With Quote
  #5  
Old 03-06-2014, 03:20 AM
SPEEDKILLZ SPEEDKILLZ is offline
 
Join Date: Feb 2011
Location: USA
Posts: 641
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you but 0 movement at all. After i insert the code it goes and stays lol

--------------- Added [DATE]1394079978[/DATE] at [TIME]1394079978[/TIME] ---------------

ok odd but i figured it out. I did away with the two bottom sections of code and went with

Code:
.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 [DATE]1394082959[/DATE] at [TIME]1394082959[/TIME] ---------------

Edit: Got the remember me moved thanks to Lynne 4 years ago lol

https://vborg.vbsupport.ru/showthrea...ht=remember+me
Reply With Quote
  #6  
Old 03-06-2014, 04:50 AM
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Location: TX
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SPEEDKILLZ View Post
Thank you but 0 movement at all. After i insert the code it goes and stays lol

--------------- Added [DATE]1394079978[/DATE] at [TIME]1394079978[/TIME] ---------------

ok odd but i figured it out. I did away with the two bottom sections of code and went with

Code:
.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 [DATE]1394082959[/DATE] at [TIME]1394082959[/TIME] ---------------

Edit: Got the remember me moved thanks to Lynne 4 years ago lol

https://vborg.vbsupport.ru/showthrea...ht=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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:45 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.08676 seconds
  • Memory Usage 2,246KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (10)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (1)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (2)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete