Change content heading text color in homepage - magento

I am starting up with Magento.
Trying to change color of content heading to red.
I have updated cms_page table like below using HTML tags:
It is being shown on page like below:
Color is not changed.Text is being shown as it is, with tags.
How can I set color for content heading?

Well, the tag isn't good.
If you want to style inline you should use something like:
<p style="color:red">New Content Heading</p>
Although i would strongly recommend to style via less files
Hope this helps you!

Related

How to set title tag in magento2.1

As suggested by our SEO guys, they wanted to show title tag on product detail page's thumb images. I am able to manage other image's title tags on the same page but not able to set title tag here. Here is screenshot for more idea. http://nimb.ws/hX74Fr
Following files I have modified and added title but no luck.
/vendor/magento/module-catalog/Block/Product/View/Gallery.php
getGalleryImagesJson() function, added title tag
/vendor/magento/module-configurable-product/Helper/Data.php
getOptions($currentProduct, $allowedProducts) function, added title tag.
I assume above files and willing to override if these are the files only. Any help will be highly appreciated.
Thanks in advance.

CKeditor, colour of text seems to be not retained although HTML is correct, how to resolve?

I am using CKEditor 4.4.5.
Users use the text colour icon to change the colour of a word which works fine. When one checks the underlying HTML, it shows:
<p><span style="color:#FF0000">test </span></p>
However when clicks the "source" icon again to return to the standard non HTML view, the colouring has gone, although the underlying HTML is still correct. If you take this HTML and render it in a browser it will work correctly. So it seems that CKEditor is not able to render text colour correctly, unless freshly changed using the text colour icon.
We had customers thinking that the colour had not changed, and then trying to fix the issue in the HTML, which resulted in the total corruption of the HTML due to human error.
Is this a bug, or am I missing something?
Thanks.
As for CKEditor it might so happen that Advanced Content Filter will strip undesired tags / attributes.
If you don't have colorbutton plugin, CKEditor will strip this span (see standard demo).
You have 2 simple solutions:
Add colorbutton plugin.
Simply add to your config:
config.extraPlugins = 'colorbutton';
Add ACF proper rule.
config.extraAllowedContent = 'span{color}';
For more informations about ACF see Content Filtering (ACF).

Content attribute in CSS to show image icon

While creating and learning bootstrap page. I came across the content attribute of css I read few articles and I got how it works. But following code snippet shows me an image icon but the content attribute value really isn't the image url but a code. I'm not clear as how we can show the image without the url and where is the image coming from?
.test.glass i:before {
content: "\e001";
}
Following is the html element to show an image icon using above css:
<span class="test glass"><i></i></span>
But what is "\e001" is that an image code or something else?
they are utf8 codes. there are plenty of sites describing the glyphs for different standard fonts but you can also define your own font set with whatever images you choose as whatever character.
if you use a webfont, from fontello for example but are plenty of sites like that one, you can define what image to use as character \e0001 and whenever you want to use that image, you must make sure you use that font-face for the element and use the utf8 code to display the image. in html it would be someting like <span class="iconfont"></span>. if you add the image with css then is like in your example.

Resizing/Scaling images in a view by setting custom CSS width

Problem
I'm doing some maintenance and changes on a Drupal site, but I'm not an expert. My problem is the following. I have a view that produces an HTML table by fetching some field values and putting them into the table columns. One of these field is an image. Unfortunately each image has a different size (images are uploaded by users), and so the overall table looks ugly. I would like to resize/scale images so that they all have the same width. I know I can use CSS to set the image width to a fixed value, and let the height adjust accordingly:
<img src="..." style="width:70px"/>
Unfortunately I don't know how to make Drupal output this custom HTML when processing my view. Currently the produced HTML looks like this:
<img
class="imagefield imagefield-field_imgsmall"
width="100"
height="39"
alt=""
src="http://www.mysite.org/sites/default/files/foobar.png?1292948397">
and I guess this is produced by one of the view's fields (namely field_imgsmall).
First question is: what is that number after the ? in the src URL? And where does it come from? (Each image has a different number in the corresponding src URL)
What I've tried
I've noticed that in the "edit view" mode, when selecting a field, I can check the option Rewrite the output of this field, and there I can mix HTML and substitution patterns. However, I've seen that one of the substitution patterns that's available to me ([field_imgsmall_fid]) is actually producing the entire HTML above ... so I can't customize it.
What can I do? Am I going in a totally wrong direction?
You should look into the imagecache module, which allows you to resize images (and cache the results, so the resizing process rarely happens).
Here's a walkthrough:
http://2bits.com/articles/drupal-using-imagecache-with-views-and-cck-imagefields.html

In Textmate, how do I change the color for text inside HTML tags?

In Textmate, I'd like to change the color of text inside HTML tags. I'd prefer it if I could specify which tags would have its text color changed; I really only want text inside <A> tags to have a different color, but I'd also like to be able to add more tags later on if I want to.
So essentially, any code inside <A> tags I'd like to appear as a different color from the color used for plain text. Anyone know how I could do this? Would I have to modify the HTML bundle's Language code to make this work?
To give HTML tags different colors in your TextMate.
Open the Preferences ( Command + , )
Click on the Fonts and Colours tab
Create a new theme if you may OR
For the selected theme, change the settings for the Markup tag element.

Resources