acqua
October 19, 2012, 7:44pm
1
how can i force a banner contained in the following code:
<script type=“text/javascript” src=“http://sdasdasdsasasdsdsccccc ;cre=mu;js=y;target=_blank”></script>
to have a specific width and height?
i tried by putting it into a div, but still the banner keeps its original sizes
Perhaps having it in a div but do something like, to over ride the image.
#ad_code img { width: 400px; height: 100px }
ralphm
October 20, 2012, 6:35am
3
@acqua : To me, it’s not really clear what you mean by “a banner contained in the following code”. Contained in what way?
acqua
October 20, 2012, 5:02pm
4
i have this ad banner ok?
<script type=“text/javascript” src=“http://sdasdasdsasasdsdsccccc ;cre=mu;js=y;target=_blank”></script>
and the normal size would be 300x250
but my needs is to resize it to 200x200 so i need the div to “force” its widht and height, if possible
ralphm
October 20, 2012, 10:25pm
5
That’s not an ad banner. It’s a line of JavaScript.
acqua
October 20, 2012, 10:30pm
6
Ok it is a JS and it calls a banner
Is it possible to set the width and height of the JS?
ralphm
October 20, 2012, 10:35pm
7
No, the JS just pulls in the banner and then gets out of the way. So you need to set the size of the banner. We’d need to see the code that is pulled in to suggest how to target it with CSS.
acqua
October 20, 2012, 11:03pm
8
you mean you want to see the code?
it’s more or less like the one i originally posted
ralphm
October 20, 2012, 11:12pm
9
Not the link to the JS file, but the actual HTML that is pulled in by that link. It will probably be a series of divs, perhaps an iframe etc. that contains all the content of the banner.
Are you able to link to the site? That would be the easiest option.
acqua
October 20, 2012, 11:15pm
10
Not the link to the JS file, but the actual HTML that is pulled in by that link. It will probably be a series of divs, perhaps an iframe etc. that contains all the content of the banner.
Are you able to link to the site? That would be the easiest option.
all i have is this code to put in the page where i need to show the banner:
<script type="text/javascript" src="http://fdssddfsddfsdf.eu/eas?cu=14940;cre=mu;js=y;target=_blank"></script>
and this other to put in the header code
<script type="text/javascript" language="JavaScript" src="http://fdssddfsddfsdf.eu/EAS_tag.1.0.js"></script>
ralphm
October 20, 2012, 11:25pm
11
OK, then we’d need to see the site to look at the code, or you can use the web inspector (right click on the banner in Chrome and choose Inspect Element) to see the code that is pulled in by that link.
ralphm
October 21, 2012, 1:32am
12
Hm, doesn’t seem to be easy to manipulate the code much, but you could do something simple like add this to your CSS to make it look a bit better:
ins {
width: 100% !important;
background: black;
}
acqua
October 21, 2012, 9:33am
13
Can u suggest inline css pls?
ralphm
October 21, 2012, 9:38am
14
No, you can’t do it inline, because you don’t have access to the code. All you could do is put it in the head of your page like this:
<style>
ins {
width: 100% !important;
background: black;
}
</style>
acqua
October 21, 2012, 11:55am
15
I put the code in <div class=“adv”>
and recall the class in the header:
<style>
adv {
width: 100% !important;
background: black;
}
</style>
but the banner still show in the un-wanted size
ralphm
October 21, 2012, 12:17pm
16
You forgot the dot before “adv”
[COLOR="#FF0000"].[/COLOR]adv {
width: 100% !important;
background: black;
}
acqua
October 21, 2012, 2:04pm
17
the problem now is the height change but width doesn’t
ralphm
October 21, 2012, 2:20pm
18
You’ve set it to a width of 1px and a height of 10px
.adv {
width: 1px !important;
height: 10px !important;
background: black;
}
What are you actually trying to do here? Do you want to get rid of it altogether?
acqua
October 21, 2012, 5:32pm
19
You’ve set it to a width of 1px and a height of 10px
.adv {
width: 1px !important;
height: 10px !important;
background: black;
}
What are you actually trying to do here? Do you want to get rid of it altogether?
i simply want to force the banner to have:
width: 10px
height 10px
And are you saying that it doesn’t work, even after changing width: 1px !important; (which is apparently what you have) to width: 10 px !important; ?