Forum Moderators: not2easy

Message Too Old, No Replies

Help w/ CSS and included Script

Trying to style a GoDaddy SSL badge

         

kabbink

6:20 am on Nov 12, 2008 (gmt 0)

10+ Year Member



Hey everyone,

I am having trouble with getting my GoDaddy SSL badge to not have a border around it.

In my CSS file I have the following which gives images a border unless specified as <img class="no-border" ...>

/* images */
img {
border: 2px solid #CCC;
}

img.no-border {
border: none;
}

This is causing a border to be displayed around my GoDaddly secure badge which I have included in my files with:

<td><script language="Javascript" src="https://seal.godaddy.com/getSeal?sealID=123..."></script></td>

I have verified that the css is the problem by changing the border color and verifying that the border around the SSL badge changes.

What do I need to get rid of this dumb border?

Thanks!

[edited by: swa66 at 8:28 am (utc) on Nov. 12, 2008]
[edit reason] removed specifics [/edit]

lavazza

6:46 am on Nov 12, 2008 (gmt 0)

10+ Year Member



The c in CSS stands for cascading... its a hierarchical thang...

Earlier declarations are over-ridden by the most recent...

Unless...

Unless the earlier have a ! important attribute...

Instead of:
img.no-border {
border: none;
}
try
img.no-border {
border: none ! important;
}

------

Another (possible) solution:

Instead of incorporating the relevant image via a <script> embedded in the <body>, why not link directly to the image as per (for example):

<td><img class="no-border" src="http://www.example.com/images/filename.gif" alt="some descriptive text here"></td>

-----

Oh, and...

instead of
<script language="Javascript" src="blahBlahBlah"></script>
try
<script type="text/javascript" src="blahBlahBlah"></script>

kabbink

7:49 am on Nov 12, 2008 (gmt 0)

10+ Year Member



Ok I forgot to mention that my:

img.no-border {
border: none;
}

Actually does work fine...I just don't know how to use it with the tag I am using to include the badge witch is

<td><script language="Javascript" src="https://seal.godaddy.com/getSeal?sealID=123..."></script></td>

However if I do <img class="no-border" src=...> that will work and prevent the border from being shown.

However if I use something like:
<td><script class="no-border" language="Javascript" src="https://seal.godaddy.com/getSeal?sealID=123..."></script></td>

then is obviously doesn't work.

The reason I can't include the badge using the <img...> tag is because it is a secure ssl thing that GoDaddy updates every time...kind of like those HackerSafe logos.

I think I need to do something like create a div container where I specify that images don't have a border then include the badge within that div I just don't understand css well enough to know what to do.

Hope that makes things more clear.

Thanks

[edited by: swa66 at 8:31 am (utc) on Nov. 12, 2008]
[edit reason] remove specifics, fix layout [/edit]

swa66

8:27 am on Nov 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd try this:

html:


<td id="seal">
<script language="Javascript" src="https://seal.godaddy.com/getSeal?sealID=#*$!">
</script>
</td>

css:


#seal {
border: none;
}

@lavazza:
Specificity make the selector img.no-border have precedence over the selector img

kabbink

8:37 am on Nov 12, 2008 (gmt 0)

10+ Year Member



That didnt fix it. I think the problem is that the script tag is basically outputting an image....

I have no idea! I will try any suggestions!

Thanks!

swa66

9:01 am on Nov 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



oops I meant to write:


#seal img {
border: none;
}

(selects all images inside the table cell, no matter how they are nested)

rocknbil

2:53 pm on Nov 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or . . . .

<div id="seal">
<script type="text/javascript" src="https://seal.godaddy.com/getSeal?sealID=#*$!">
</script>
</div>

kabbink

6:04 pm on Nov 12, 2008 (gmt 0)

10+ Year Member



Still the same problem. I have tried all the above suggestions to no avail. I will try anything you guys can throw at me with a chance of working!

Thanks!

lavazza

6:14 pm on Nov 12, 2008 (gmt 0)

10+ Year Member



Specificity make the selector img.no-border have precedence over the selector img

Ummm... yeah... but... even before you edited the URI in the OP, we couldn't 'see' the contents of that file, so how do we know if the image in the godaddy script doesn't have a class attribute? The ! important was one suggestion

------------------
Oh, and it ain't
script language="Javascript"
its
script type="text/javascript"

;)

swa66

3:28 pm on Nov 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm afraid the script is going to be doing more than just generate an image. It might e.g. generate an iframe and load some html into that. In that case your css isn't going to get grip on it at all.

The fastest trick to determine what the browser is rendering is to look at the generated code. The tool I'd use for that is the web developer add-in [addons.mozilla.org] for Firefox.
It's under the view source menu.