[Pro] Javascript Help

Hey guys, I need help with some Javascript code. I’m trying to position the BBB logo on this website and the Javascript keeps reseting the position. Refresh the page to see what I’m talking about. Is there anyway to override it from doing this?

Thanks!

http://wmp.idealynx.com/


freewaytalk mailing list
email@hidden
Update your subscriptions at:

How did you add it to your page?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:

The reason I ask is because if you have just used Insert > Markup Item then it can float about inline and be affected by external CSS.
Create an Html item first - the correct size - that you position in your layout. Then use Insert > Markup item inside it.

That may give you greater control.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:

Hey Dave, thanks for your response.

I added the code with the Crowbar action. It’s been a while since I added code to an HTML item so may need to walk me through the process.


freewaytalk mailing list
email@hidden
Update your subscriptions at:

Hey Kelly,

Your problem isn’t javascript, but countering the remote CSS style that the script is bringing in. You have this style–

a#bbblink {
    display: block;
    position: relative;
    text-align: center;
    color: #005A78;
    text-decoration: none;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

add this:

    margin: 0 auto !important;
    top: -40px;
    left: -10px;

that should force the logo to center back under your image.


freewaytalk mailing list
email@hidden
Update your subscriptions at:

Thanks Ernie. Unfortunately, I couldn’t get this to work. In the end the script takes over and resets the position.


freewaytalk mailing list
email@hidden
Update your subscriptions at:

Thanks Ernie. Unfortunately, I couldn’t get this to work. In the end the script takes over and resets the position.

Unfortunately, you didn’t post your efforts to your example at http://wmp.idealynx.com so we could all see the not working aspect of my solution.

So let me type slowly…

There is a stylesheet referenced by the code in your example:

http://seal-norfolk.bbb.org/logo/2-williamsburg-memorial-park-90011162.css

So, however the item a#bbblink is being created in your page, it is still an html item that is styled with CSS… and since we can control the CSS for this page we can control this item as well.

So, in your header styles, create this new CSS style with these properties:

a#bbblink { 
	margin: 0 auto !important; 
	top: -40px; 
	left: -10px; 
}

How do I know this will work? Let me show you…

http://myproof.thebigerns.com/fwt-kelly/

The margin property resets the item to be centered in its container, the top and left values make adjustments for other cosmetic positioning values (the empty paragraph tag above the item, the fact the container doesn’t “look” centered under that image, etc.)

So, once again, not a javascript problem but a CSS problem. Fixed with better CSS.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

So, once again, not a javascript problem but a CSS problem. Fixed with better CSS.

That is why I was suggesting the Markup inside an html container that could be positioned using FW’s CSS and the external JS and its CSS would only then affect the positioning within the newly created html container.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options