I am having problems modifing my Global Headers and Footers

Started by GlennLever, May 05, 2015, 10:30:59 AM

Previous topic - Next topic

GlennLever

I have the Global Headers and Footers package installed on my forum

Currently I have two logos has a header and a footer.



this is the code to create that header

<div style="margin-bottom: 50px;">
   <div class="floatleft" style="width: 40%; margin-left: 5%; text-align: right;">
      <a href="http://fuelinjectionent.com">
         <img src="http://www.leverfamilysite.com/images/Hidden_Pictures/FIE-Ad-small.gif" alt="" />
      </a>
   </div>
   <div class="floatright" style="width: 40%; margin-right: 5% text-align: left">
         <a href="">
            <img src="http://www.leverfamilysite.com/images/Hidden_Pictures/VRS3.jpg" alt="" />
         </a>
   </div>
   <br class="clear" />
</div>


I wish to create a third but it is not coming out correctly. this is the code I used

<div style="margin-bottom: 50px;">
   <div class="floatleft" style="width: 25%; margin-left: 5%; text-align: right;">
      <a href="http://www.lever-family-racing.com/">
         <img src="http://www.lever-family-racing.com/wp-content/uploads/2014/10/Milan-0151-300x215.jpg" alt="" />
      </a>
   </div>
<div class="float_center" style="width: 25%; text-align: center;">
      <a href="http://fuelinjectionent.com">
         <img src="http://www.leverfamilysite.com/images/Hidden_Pictures/FIE-Ad-small.gif" alt="" />
      </a>
   </div>
   <div class="floatright" style="width: 25%; margin-right: 5% text-align: left">
         <a href="">
            <img src="http://www.leverfamilysite.com/images/Hidden_Pictures/VRS3.jpg" alt="" />
         </a>
   </div>
   <br class="clear" />
</div>

This is the result



What have I done wrong?

roshaoar

Your site is blocked by my firewall (it thinks it's category:weapons) so I can't tell, but does class float_center definitely exist?

Kindred

if you have a question regarding a specific mod (global headers and footers) then you really need to ask it in the thread dedicated to supporting that specific mod.

if you have a question regarding general usage of HTML, then I will move this to the coding section, since it is not actually a questions regarding SMF support.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GlennLever

Quote from: Kindred on May 05, 2015, 11:19:17 AM
if you have a question regarding a specific mod (global headers and footers) then you really need to ask it in the thread dedicated to supporting that specific mod.

if you have a question regarding general usage of HTML, then I will move this to the coding section, since it is not actually a questions regarding SMF support.

This is a coding question, not a mod question the mod allows the code, I'm making no changes to the mod

GlennLever

Quote from: roshaoar on May 05, 2015, 10:41:35 AM
Your site is blocked by my firewall (it thinks it's category:weapons) so I can't tell, but does class float_center definitely exist?

I found it looking for help in Google, so I think it does

Web site has nothing to do with weapons? it is about Front Engine Dragsters

Kindred

you found a class looking for help in google?


Did you add that class to your site's CSS?   You can't just randomly add classes and expect them to work without defining the class first
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

roshaoar

Hello,

Kindred is quite right that you can't just apply a random class, but I don't get the feeling that you're very familiar with how CSS works, so you perhaps did not know that.

The class bit needs to be defined in your css file, there isn't such a thing as a default. So unless you've defined what float_center actually does in a file that's ready by your page, it'll do nothing. Some other guy probably made a css file with a class called float_center which is maybe why you copied and used it. Anyone can call their classes anything they like.

So the CSS is ignoring the class and is just applying width: 25%; text-align: center. What happens if you do "class="floatleft" style="width: 45%;display:inline"



GlennLever

Quote from: roshaoar on May 05, 2015, 02:25:06 PM
Hello,

Kindred is quite right that you can't just apply a random class, but I don't get the feeling that you're very familiar with how CSS works, so you perhaps did not know that.

The class bit needs to be defined in your css file, there isn't such a thing as a default. So unless you've defined what float_center actually does in a file that's ready by your page, it'll do nothing. Some other guy probably made a css file with a class called float_center which is maybe why you copied and used it. Anyone can call their classes anything they like.

So the CSS is ignoring the class and is just applying width: 25%; text-align: center. What happens if you do "class="floatleft" style="width: 45%;display:inline"

You are right I am not  familiar with how CSS works or coding in HTML. I stumbled through getting the two logos up and centered, and am now trying to figure out how to add the third based on what I stumbled through three years ago. I had a great deal of help three years ago and am looking for more now.

smsabbir480

I suggest at first in your css file write this code
*{margin:0; padding:0}.I think this will solve your problem.

Kindred

Quote from: smsabbir480 on July 15, 2015, 07:49:27 AM
I suggest at first in your css file write this code
*{margin:0; padding:0}.I think this will solve your problem.


HUH? WHAT?
that makes no sense at all.
CSS should hve a DEFINED class --- but that class has to be CALLED in the HTML in order to be applied.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

live627

Simple code is the best code.

<div style="margin-bottom: 50px; text-align: center;">
      <a href="http://www.lever-family-racing.com/">
         <img src="http://www.lever-family-racing.com/wp-content/uploads/2014/10/Milan-0151-300x215.jpg" alt="" />
      </a>
      <a href="http://fuelinjectionent.com">
         <img src="http://www.leverfamilysite.com/images/Hidden_Pictures/FIE-Ad-small.gif" alt="" />
      </a>
         <a href="">
            <img src="http://www.leverfamilysite.com/images/Hidden_Pictures/VRS3.jpg" alt="" />
         </a>
</div>

Antes

FYI: * means everything, which breaks dozens of things in style if you put margin/padding zero. Please be careful with those classes you horribly break your layout.

yakyakyak

GlennLever

Your hidden_pictures as such are not hidden at all, nor is the parent directory /images


http://www.leverfamilysite.com/images/Hidden_Pictures/


;-)

GlennLever

I have finally resolved this issue, needed to change code on my web site inorder to make it work

GlennLever

Well this problem had been resolved, but when I install SMF 2.0.13



I lost my Global Headers and Footers, and my embedded video player .

They show up as installed but they do not appear in the forum



For the life of me I cannot remember where the code goes?

Can someone point me to a "download and install mod for dummies" link

Where, what option, do I look at in the admin section of the forum to modify the code?
.
.
.
.
.

Kindred

you used the large upgrade instead of the patch, didn't you?


Don't do that.... there's a reason we release patches.

At this point, you have two choices.


Load a fresh set of 2.0.13 files from the large upgrade again, just to make sure things are clean.
then clear out the mods (using repair_settings.php)
and then reinstall them.



or

restore the backup of the 2.0.12 files (which you should have taken before you did the upgrade)
and then use the patch to upgrade this time.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GlennLever

Quote from: Kindred on February 16, 2017, 05:43:03 PM
you used the large upgrade instead of the patch, didn't you?


Don't do that.... there's a reason we release patches.

At this point, you have two choices.


Load a fresh set of 2.0.13 files from the large upgrade again, just to make sure things are clean.
then clear out the mods (using repair_settings.php)
and then reinstall them.



or

restore the backup of the 2.0.12 files (which you should have taken before you did the upgrade)
and then use the patch to upgrade this time.

Yes, I did a backup and I did not use the forum backup.

I really wish there was a simple guide to what to do and what not to do for idiots like me.

I think what I would like to do is uninstall the three mods I have on the forum and then reinstall them to see if that fixes the problem.

Would you provide a link to the manual on apply mods, step ny step start to finish.

I will close the other thread.

GlennLever

Quote from: GlennLever on February 16, 2017, 06:36:17 PM
Quote from: Kindred on February 16, 2017, 05:43:03 PM
you used the large upgrade instead of the patch, didn't you?


Don't do that.... there's a reason we release patches.

At this point, you have two choices.


Load a fresh set of 2.0.13 files from the large upgrade again, just to make sure things are clean.
then clear out the mods (using repair_settings.php)
and then reinstall them.



or

restore the backup of the 2.0.12 files (which you should have taken before you did the upgrade)
and then use the patch to upgrade this time.

Yes, I did a backup and I did not use the forum backup.

I followed the direction in the manual.

I really wish there was a simple guide to what to do and what not to do for idiots like me.

I think what I would like to do is uninstall the three mods I have on the forum and then reinstall them to see if that fixes the problem.

Would you provide a link to the manual on apply mods, step ny step start to finish.

I will close the other thread.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GlennLever

How about the directions to download and apply mods please.?

Advertisement: