Add a title ("advertisement") after dfp ad - google-dfp

I would like to write below the dft ad that "advertising".
but if I make a div manually, it is not ok, because the div is showing if the ad is empty (collapsediv)
Thanks.

Try to add a css class to the ad
.adsclass:before { content: "Advertisement"; }
Or just add the div manually , you should not have any collapsediv problems , just set the right size of the div.

Related

how to apply a custom css class on a magento 2 customer forget password page

i want to apply some css for a customer forget password page only like for title. if i apply any css then it reflects on all pages but i want to apply only on a single page. can some one guide pls?
I am using m2.3.5p1
thanks
The easiest way to achieve this is to look at the <body> of the specific page you want to modify. Every page's <body> has a unique class you can root your css selector to.
In case of the forgot password page, the body's class is customer-account-forgotpassword. So, in case of the page title, just add
body.customer-account-forgotpassword h1{
//yourstyle
}
to your _extend.less or wherever you manage your css.

Custom frame as a link?

I am trying to make a custom frame that turns the whole content element into a single button using the destination set in the Header link field.
tt_content.stdWrap.innerWrap.cObject {
100 = TEXT
100.value = <a id="c{field:uid}" class="myclass" href="{field:header_link}">|</a>
100.insertData = 1
}
It doesn't work because the header is still linked making a link within a link. Is there a way to disable the link on the header so I can link the whole thing instead?

Adding icons to an button in gwt

i have button and want to set an icon to it along with the text inside it. their is no property to add icon to button like in smartGwt .. any idea how to achieve it please help.
There are many ways of achieving this.
Way 1 : Easy way
Just set the background image via code.
myButton.getElement().getStyle().setBackgroundImage("path");
Way 2: Another easy way
Set your own html
myButton.setHtml("Pass the html string");
Way 3: Easy but gives more control
myButton.addStylename("buttonStyle")
Use css to style this
.buttonStyle{
color : red;
}
Way 4: Best way according to me
Create your own split button wrapping it around a flowpanel or horizontalPanel, with image as your first widget and button as your another widget. This gives you additional control on image and as well as button. You can have your click handler on image as well as button and you can style each one of them individually.
This is how I achieved setting an icon in my get:button.
Add an extra style class hook, mine below is btn-fa-group to your gwt button. If you use the attribute 'addStyleNames' you can define them in your stylesheet and have multiple classes.
<g:Button text=" Post Your Answer" enabled="false" ui:field="showPostButton" addStyleNames="btn btn-default btn-fa-group" />
Now in your CSS define the following declaration:
btn-fa-group:before {
color: #333333;
content: "\f0c0";
display: inline-block;
font-family: "fontawesome";
}
Some important things to note; don't forget the before selector, make sure the unicode starts with a slash and have fontAwesome installed. Alternatively you can use another glyph icon if you have the font installed.
You can set innerhtml with image in button i.e.
Button button=new Button("<image src='abc.jpg' width='200px' height='300px' />Ok");
Button bt = new Button();
bt.getElement().getStyle().setBackgroundImage("url('path/to/ur/image/imagename.extention')");
also set size of background image wrt to the size of button
bt.getElement().getStyle().setProperty("backgroundSize","30px");
Add a Css Class to your Button is probalby the best solution.
button.addStyleName("ButtonIcon");
How to define the CSS and HTML you can read here.
Yes ,you can .Gwt have a SmartGwt type button called push buttopn
com.google.gwt.user.client.ui.PushButton
You can pass Image object to it as below
Image image = new Image(GWT.getModuleBaseURL() + "/images/search-arrow.png");
RootPanel.get().add(new PushButton(image));

Possible to click on link to change class on a different page?

Here is my goal: I want to click a specific link on one page, and on the page that loads, I want to change a specific class. I am aware of the onClick function, but not sure it can be used here. Is there a way to do this?
Thank you very much.
This jquery would do what you want:
$(document).ready(function(){
var anchor = '#myanchor';
if (window.location.href.indexOf(anchor) > 0) {
//do what you want here, change classes, etc
}
});
you should place this javascript on the second page, change #myanchor for your anchor used.
Make sure to include the jquery library in the second page for this to work.

How to change height of activity stream for Facebook Like Box social plugin?

http://developers.facebook.com/docs/reference/plugins/like-box
When using the Like box, the activity stream maxes out when I set the height to 395. I tried to inspect the HTML for the like box and see that the page_stream class has a height attribute but when I tried to override the CSS below, the page_stream div doesn't expand
.fan_box .page_stream {
height: ;
}
Any help would be welcome.
It's one of many Facebook bugs. You cannot set a height. It only works if you are logged in to Facebook.