Skip to main content
deleted 23 characters in body
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182

Option 1: Show an image beside the Flag text

A commonYou can use CSS technique is to add padding to the left of the text and in it show a background image, as shown also in the Community Documentationcommunity documentation about How to show an image beside the text. Here is an excerpt from it (replace "bookmarks" with the machine-name of your flag):

.flag-bookmarks a {
  padding-left: 20px;
}
.flag-bookmarks a.flag-action {
  background: url(images/i-dont-like-it.png) no-repeat left center;
}


.flag-bookmarks a.unflag-action {
  background: url(images/i-like-it.png) no-repeat left center;
}

Refer to the Flag Theming guide for (way) more details, i.e.:

  • Theming flag links using CSS, which provides a "map" of the HTML that makes a flag link.
  • Theming flag links using Templates, which explains how to use the flag.tpl.php file in the 'theme' folder that is located inside Flag's own folder, and which is used to generate the HTML for the Flag links. It also explains how you can theme different flags differently, using a flag specific flag--FLAGNAME.tpl.php file (whereas FLAGNAME is the flag's machine-name).
  • Theming examples, which contains solutions to some common theming tasks.

Option 2: Transform Flag link into a button

Another approach is toYou can transform the Flag link into a button, by adding this CSS (quote from that link):

.flag-wrapper.{flag-name} a.flag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}
.flag-wrapper.{flag-name} a.unflag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}

Notes:

  • text-indent:-9999em hides the element (by placing it off the screen).
  • Replace .{flag-name} with your flag's machine-name.

Option 1: Show an image beside the Flag text

A common CSS technique is to add padding to the left of the text and in it show a background image, as shown also in the Community Documentation about How to show an image beside the text. Here is an excerpt from it (replace "bookmarks" with the machine-name of your flag):

.flag-bookmarks a {
  padding-left: 20px;
}
.flag-bookmarks a.flag-action {
  background: url(images/i-dont-like-it.png) no-repeat left center;
}


.flag-bookmarks a.unflag-action {
  background: url(images/i-like-it.png) no-repeat left center;
}

Refer to the Flag Theming guide for (way) more details, i.e.:

  • Theming flag links using CSS, which provides a "map" of the HTML that makes a flag link.
  • Theming flag links using Templates, which explains how to use the flag.tpl.php file in the 'theme' folder that is located inside Flag's own folder, and which is used to generate the HTML for the Flag links. It also explains how you can theme different flags differently, using a flag specific flag--FLAGNAME.tpl.php file (whereas FLAGNAME is the flag's machine-name).
  • Theming examples, which contains solutions to some common theming tasks.

Option 2: Transform Flag link into a button

Another approach is to transform the Flag link into a button, by adding this CSS (quote from that link):

.flag-wrapper.{flag-name} a.flag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}
.flag-wrapper.{flag-name} a.unflag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}

Notes:

  • text-indent:-9999em hides the element (by placing it off the screen).
  • Replace .{flag-name} with your flag's machine-name.

Option 1: Show an image beside the Flag text

You can use CSS to add padding to the left of the text and in it show a background image, as shown also in the community documentation about How to show an image beside the text. Here is an excerpt from it (replace "bookmarks" with the machine-name of your flag):

.flag-bookmarks a {
  padding-left: 20px;
}
.flag-bookmarks a.flag-action {
  background: url(images/i-dont-like-it.png) no-repeat left center;
}


.flag-bookmarks a.unflag-action {
  background: url(images/i-like-it.png) no-repeat left center;
}

Refer to the Flag Theming guide for (way) more details, i.e.:

  • Theming flag links using CSS, which provides a "map" of the HTML that makes a flag link.
  • Theming flag links using Templates, which explains how to use the flag.tpl.php file in the 'theme' folder that is located inside Flag's own folder, and which is used to generate the HTML for the Flag links. It also explains how you can theme different flags differently, using a flag specific flag--FLAGNAME.tpl.php file (whereas FLAGNAME is the flag's machine-name).
  • Theming examples, which contains solutions to some common theming tasks.

Option 2: Transform Flag link into a button

You can transform the Flag link into a button, by adding this CSS (quote from that link):

.flag-wrapper.{flag-name} a.flag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}
.flag-wrapper.{flag-name} a.unflag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}

Notes:

  • text-indent:-9999em hides the element (by placing it off the screen).
  • Replace .{flag-name} with your flag's machine-name.
added 20 characters in body
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182

ShowOption 1: Show an image beside the Flag text

A common CSS technique is to add padding to the left of the text and in it show a background image, as shown also in the Community Documentation about How to show an image beside the text. Here is an excerpt from it (replace "bookmarks" with the machine-name of your flag):

.flag-bookmarks a {
  padding-left: 20px;
}
.flag-bookmarks a.flag-action {
  background: url(images/i-dont-like-it.png) no-repeat left center;
}


.flag-bookmarks a.unflag-action {
  background: url(images/i-like-it.png) no-repeat left center;
}

Refer to the Flag Theming guide for (way) more details, i.e.:

  • Theming flag links using CSS, which provides a "map" of the HTML that makes a flag link.
  • Theming flag links using Templates, which explains how to use the flag.tpl.php file in the 'theme' folder that is located inside Flag's own folder, and which is used to generate the HTML for the Flag links. It also explains how you can theme different flags differently, using a flag specific flag--FLAGNAME.tpl.php file (whereas FLAGNAME is the flag's machine-name).
  • Theming examples, which contains solutions to some common theming tasks.

TransformOption 2: Transform Flag link into a button

Another approach is to transform the Flag link into a button, by adding this CSS (quote from that link):

.flag-wrapper.{flag-name} a.flag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}
.flag-wrapper.{flag-name} a.unflag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}

Notes:

  • text-indent:-9999em hides the element (by placing it off the screen).
  • Replace .{flag-name} with your flag's machine-name.

Show an image beside the Flag text

A common CSS technique is to add padding to the left of the text and in it show a background image, as shown also in the Community Documentation about How to show an image beside the text. Here is an excerpt from it (replace "bookmarks" with the machine-name of your flag):

.flag-bookmarks a {
  padding-left: 20px;
}
.flag-bookmarks a.flag-action {
  background: url(images/i-dont-like-it.png) no-repeat left center;
}


.flag-bookmarks a.unflag-action {
  background: url(images/i-like-it.png) no-repeat left center;
}

Refer to the Flag Theming guide for (way) more details, i.e.:

  • Theming flag links using CSS, which provides a "map" of the HTML that makes a flag link.
  • Theming flag links using Templates, which explains how to use the flag.tpl.php file in the 'theme' folder that is located inside Flag's own folder, and which is used to generate the HTML for the Flag links. It also explains how you can theme different flags differently, using a flag specific flag--FLAGNAME.tpl.php file (whereas FLAGNAME is the flag's machine-name).
  • Theming examples, which contains solutions to some common theming tasks.

Transform Flag link into a button

Another approach is to transform the Flag link into a button, by adding this CSS (quote from that link):

.flag-wrapper.{flag-name} a.flag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}
.flag-wrapper.{flag-name} a.unflag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}

Notes:

  • text-indent:-9999em hides the element (by placing it off the screen).
  • Replace .{flag-name} with your flag's machine-name.

Option 1: Show an image beside the Flag text

A common CSS technique is to add padding to the left of the text and in it show a background image, as shown also in the Community Documentation about How to show an image beside the text. Here is an excerpt from it (replace "bookmarks" with the machine-name of your flag):

.flag-bookmarks a {
  padding-left: 20px;
}
.flag-bookmarks a.flag-action {
  background: url(images/i-dont-like-it.png) no-repeat left center;
}


.flag-bookmarks a.unflag-action {
  background: url(images/i-like-it.png) no-repeat left center;
}

Refer to the Flag Theming guide for (way) more details, i.e.:

  • Theming flag links using CSS, which provides a "map" of the HTML that makes a flag link.
  • Theming flag links using Templates, which explains how to use the flag.tpl.php file in the 'theme' folder that is located inside Flag's own folder, and which is used to generate the HTML for the Flag links. It also explains how you can theme different flags differently, using a flag specific flag--FLAGNAME.tpl.php file (whereas FLAGNAME is the flag's machine-name).
  • Theming examples, which contains solutions to some common theming tasks.

Option 2: Transform Flag link into a button

Another approach is to transform the Flag link into a button, by adding this CSS (quote from that link):

.flag-wrapper.{flag-name} a.flag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}
.flag-wrapper.{flag-name} a.unflag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}

Notes:

  • text-indent:-9999em hides the element (by placing it off the screen).
  • Replace .{flag-name} with your flag's machine-name.
added 1 character in body
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182

Show an image beside the Flag text

A common CSS technique is to add padding to the left of the text and in it show a background image, as shown also in the Community Documentation about How to show an image beside the text. Here is an excerpt from it (replace "bookmarks" with the machine-name of your flag):

.flag-bookmarks a {
  padding-left: 20px;
}
.flag-bookmarks a.flag-action {
  background: url(images/i-dont-like-it.png) no-repeat left center;
}


.flag-bookmarks a.unflag-action {
  background: url(images/i-like-it.png) no-repeat left center;
}

Refer to the Flag Theming guide for (way) more details, i.e.:

  • Theming flag links using CSS, which provides a "map" of the HTML that makes a flag link.
  • Theming flag links using Templates, which explains how to use the flag.tpl.php file in the 'theme' folder that is located inside Flag's own folder, and which is used to generate the HTML for the Flag links. It also explains how you can theme different flags differently, using a flag specific flag--FLAGNAME.tpl.php file (whereas FLAGNAME is the flag's machine-name).
  • Theming examples, which contains solutions to some common theming tasks.

Transform Flag link into a button

Another approach is to transform the Flag link into a button, by adding this CSS (quote from that link):

.flag-wrapper.{flag-name} a.flag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}
.flag-wrapper.{flag-name} a.unflag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}

NoteNotes:

  • text-indent:-9999em hides the element (by placing it off the screen).
  • Replace .{flag-name} with your flag's machine-name.

Show an image beside the Flag text

A common CSS technique is to add padding to the left of the text and in it show a background image, as shown also in the Community Documentation about How to show an image beside the text. Here is an excerpt from it (replace "bookmarks" with the machine-name of your flag):

.flag-bookmarks a {
  padding-left: 20px;
}
.flag-bookmarks a.flag-action {
  background: url(images/i-dont-like-it.png) no-repeat left center;
}


.flag-bookmarks a.unflag-action {
  background: url(images/i-like-it.png) no-repeat left center;
}

Refer to the Flag Theming guide for (way) more details, i.e.:

  • Theming flag links using CSS, which provides a "map" of the HTML that makes a flag link.
  • Theming flag links using Templates, which explains how to use the flag.tpl.php file in the 'theme' folder that is located inside Flag's own folder, and which is used to generate the HTML for the Flag links. It also explains how you can theme different flags differently, using a flag specific flag--FLAGNAME.tpl.php file (whereas FLAGNAME is the flag's machine-name).
  • Theming examples, which contains solutions to some common theming tasks.

Transform Flag link into a button

Another approach is to transform the Flag link into a button, by adding this CSS (quote from that link):

.flag-wrapper.{flag-name} a.flag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}
.flag-wrapper.{flag-name} a.unflag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}

Note:

  • text-indent:-9999em hides the element (by placing it off the screen).
  • Replace .{flag-name} with your flag's machine-name.

Show an image beside the Flag text

A common CSS technique is to add padding to the left of the text and in it show a background image, as shown also in the Community Documentation about How to show an image beside the text. Here is an excerpt from it (replace "bookmarks" with the machine-name of your flag):

.flag-bookmarks a {
  padding-left: 20px;
}
.flag-bookmarks a.flag-action {
  background: url(images/i-dont-like-it.png) no-repeat left center;
}


.flag-bookmarks a.unflag-action {
  background: url(images/i-like-it.png) no-repeat left center;
}

Refer to the Flag Theming guide for (way) more details, i.e.:

  • Theming flag links using CSS, which provides a "map" of the HTML that makes a flag link.
  • Theming flag links using Templates, which explains how to use the flag.tpl.php file in the 'theme' folder that is located inside Flag's own folder, and which is used to generate the HTML for the Flag links. It also explains how you can theme different flags differently, using a flag specific flag--FLAGNAME.tpl.php file (whereas FLAGNAME is the flag's machine-name).
  • Theming examples, which contains solutions to some common theming tasks.

Transform Flag link into a button

Another approach is to transform the Flag link into a button, by adding this CSS (quote from that link):

.flag-wrapper.{flag-name} a.flag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}
.flag-wrapper.{flag-name} a.unflag-action {
  background-image: url('path to the button image');
  display:block;
  text-indent:-9999em;
}

Notes:

  • text-indent:-9999em hides the element (by placing it off the screen).
  • Replace .{flag-name} with your flag's machine-name.
edited body
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182
Loading
edited body
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182
Loading
added 397 characters in body
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182
Loading
added 783 characters in body
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182
Loading
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182
Loading