vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Help Changing header ad code. (https://vborg.vbsupport.ru/showthread.php?t=309212)

SPEEDKILLZ 03-06-2014 01:05 AM

Help Changing header ad code.
 
1 Attachment(s)
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

bzcomputers 03-06-2014 02:04 AM

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.

SPEEDKILLZ 03-06-2014 02:45 AM

Quote:

Originally Posted by bzcomputers (Post 2485341)
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?

bzcomputers 03-06-2014 03:12 AM

Quote:

Originally Posted by SPEEDKILLZ (Post 2485348)
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.

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 [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

bzcomputers 03-06-2014 04:50 AM

Quote:

Originally Posted by SPEEDKILLZ (Post 2485360)
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.


All times are GMT. The time now is 09:13 PM.

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.01102 seconds
  • Memory Usage 1,741KB
  • 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
  • (10)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete