Using Font Awesome in XSLTForms - font-awesome

I tryed to use Font Awesome in XSLTForms but no sucess. I included a link in the header, but every time I try to use an icon, it is not shown. Other CSS styles contained in different files work, but even if I include a tags at the beggining and at the end of the file (for pre-processor) it doesnt work.
<link type="text/css" rel="stylesheet" href="/font-awesome-4.3.0/css/font-awesome.min.css"/>
Any idea?

Write this in xforms header and remove the <css></css> tags at the beggining and at the end of the file (for pre-processor)
<?css-conversion no?>

Related

local css stylesheet not linking

I'm trying to add my .css file, but it is not working and not applying.
But when I put the same style code in HTML it works, so the problem is links, but I think I am doing it right.
enter image description here
I have also tried putting <link rel="stylesheet" href="style.css"> but I know I gotta put the folder names too, so both don't work.
Also, something was wrong with linking, because I tried putting in <img> and it still wouldn't link or show but when I tried online image, it would link.
change the 9th line as
<link rel="stylesheet" href="../static/style.css">
because u need to go back from dashboard.html use"../"
Then goes to the stylesheet file as "static/style.css"
Path should be ../static/style.css in href attribute

CSS Loaded but not being applied

I know it's already been asked but that person had a typo, and the answer mentioned firebug so it's not current (and is closed).
In WordPress, I noticed that main file, style.css is not being applied, specifically:
The file IS loaded correctly
Its styles are NOT being applied
When I inspect element for an element I know is being targeted by style.css, nothing from style.css is there (styles tab of inspect element) at all. I've inspected several elements.
It's loaded through WordPress as so (an unchanged call generated with _underscores):
wp_enqueue_style( 'themexzz-style', get_stylesheet_uri(), array(), _S_VERSION );
This is the produced link (and clicking on it works like it's supposed to):
<link rel='stylesheet' id='themexzz-style-css' href='http://localhost:8012/themexzz/wp-content/themes/themexzz/style.css?ver=1.0.0' media='all' />
I'm using
Xampp with php 7.2.3
with wordpress 5.5.3
meta charset="UTF-8"
Database collation is utf8mb4_unicode_ci
It's an underscores generated theme
Thanks in advance.
#Xhynk - You were right. It was the:
you may have invalid CSS way at the beginning of that file, blocking
all the rest of the CSS being applied
As it is an underscores theme and I apply my own CSS from another file, it didn't even cross my mind that there might be invalid CSS in style.css
Thank you #Xhynk
The position of CSS files in head tag also matters,
Assume that you have loaded 2 CSS file in the head tag
<link rel='stylesheet' href="..../style.css">
<!--(have property of background color blue and text white)-->
<link rel='stylesheet' href="..../mycss.css">
<!--(have property of background color white and text black)-->
if you place tags in this order
<head>
<link rel='stylesheet' href="..../style.css">
<link rel='stylesheet' href="..../mycss.css">
</head>
Both the files will be loaded but CSS will be applied of the myss.css file,
this happens because of CSS overwrite
You can change the position of the link tags to get your desired output

Where should css go in .html page?

I have a index.html page and a style.css file.
I have a style class called .slider and a style class called .logo. Should I put both .slider and .logo inside the style.css page or should i put .slider in index.html and .logo inside .css?
im asking this because i dont know if I should put styles only related to one page inside a global style.css or should i just put it inline in the page it applies to?
Typically you embed css that is page specific. Here is how I do my css:
Global css (seperate file(s)):
<link type="text/css" rel="stylesheet" href="css/style.css" media="all" />
NOTE: In today's web world we use a ton of plugins/themes and these plugins/themes tend to roll out newer versions so when you override these plugins/themes make sure you create a css file specific to that theme.
For instance,
Bootstrap 3.1
<link href="/css/bootstrap.3.1.css" rel="stylesheet" type="text/css">
Create this for all your bootstrap overrides so you can use the latest version when it comes out.
<link href="/css/bootstrap.overrides.css" rel="stylesheet" type="text/css">
Page specific css(embedded):
<head>
<!-- last element in head //-->
<style type="text/css">
.pageSpecific
{
color: red;
}
</style>
</head>
When I am in development stages or the html element does not require css classification.
Simple style format (inline):
<th style="min-width: 65px;">Column Header</th>
You may have print specific css as well:
<link href="/css/print.css" rel="stylesheet" type="text/css">
and inside this file wrap your css as such:
#media print{
<!-- print specific css here//-->
}
Keep in mind that you may want to use a css classifcation at a later date when at the time it may seem page specific. Always code for reusability!
Finally:
I like to use css minifier when I put my file(s) into production. I do the same with my javascript files using UglyJs. There is also LESS css that you can use but for now I would stick to these simple conventions or something similar.
Styles can go in one of three places.
Inline on the element itself
In the html page
In a separate file
I would suggest either putting it in a <style> tag in the <head> of your html or putting it in a separate file, either will work just as well. Obviously having the styles in a separate file means you could reuse those styles on another page if needed.
Either way, it won't make a difference. Personally, I like to have all of my CSS in one place, but you can do whatever you want. If you do put all of your CSS in one document, use comments to separate it into groups, so everything will be easy to find.
You should NEVER have inline or on-page CSS. It should all go in the stylesheet (of which you should only have one per media-type) - why? Because stylesheets are cached, and the cache is way better to hold it than the HTML-files (which may also be cached, by all means, but with dynamic content, they often load quite more often than CSS).
Second, it's a nightmare to update and change, if not everything is in one file.

How to add external css into html

I've used inline and imported css loads but having trouble with external and never tried it before.
I copy and pasted everything from this link css link
into a css file, I don't actually know specifically which animations I want to keep and get rid of yet, that will come later.
How do I actually add it into the html though? In the Header I have the
<link rel="stylesheet" type="text/css" href=\animate.css">
link so my html is inked to my css.
If I wanted to add for example .animated.hinge to a <p> how would I do this?
Preferably without any javascript or php, haven't progressed that far yet!
Thanks!
The problem is that you are using a backslash instead of a forward slash and missing a double quote when you are linking to the CSS file.
<link rel="stylesheet" type="text/css" href="/animate.css">
Web sites are all about files. If you have a file called animate.css in the same folder as your index.html, you can simply call it with the next tag
<link rel="stylesheet" type="text/css" href="animate.css">
This means that you are referencing the animate.css file. There you select your objects by clases and just use them in the html file.
Also you would add classes to the p element like so
<p class="animated hinge">Paragraph</p>
We can include external css file through the link tag in head tag. Please see below syntax for the same. also check the file path(href path), it should be relative or absolute.
<link rel="stylesheet" type="text/css" href="/custom.css">
You are missing one double inverted comma at start and you have to use '/' in the href attribute instead of '\'.

Add a picture to your title in HTML

I don't know how to add an image icon to the title,
I have a favion Icon but it doesn't come, when I try to add a picture using the img src tag it comes as it is, no image!
<link rel="icon" type="image/ico" href="favicon.ico" />
Post this inside your <head> tags.
Go to: http://tools.dynamicdrive.com/favicon/
Generate your favicon
then put your favicon.ico icon into your public_html/www/httpdocs folder, in other words, put the icon into the folder where your homepage is located.
Additionally you may type the following code into the homepage's <head></head> section:
<link rel="short icon" href="favicon.ico" />
Wait...are you literally trying to stick an <img> element in the <title>? That ain't gonna fly -- the title can't contain HTML. It contains what's called replaceable character data. Only entity references and the element's closing tag mean anything to the parser; everything else is taken literally, and shows up basically as if you'd already HTML-escaped it. If your HTML said <title><img> stuff</title>, for example, the document's title would be the literal text '<img> stuff', and a search engine would be entirely correct to show that literal text (replacing < with < on its end so it shows up correctly). In fact, it'd be largely incorrect not to, in my opinion; what if your page was about how to use the <img> tag?
The only standard way you're going to get an image anywhere near the title is by properly adding a favicon. It still won't be in the title, but that doesn't make much sense anyway. It'll show up next to the URL in most browsers, which is what you and your users typically want. And OSes that let you create web shortcuts will often use it as the shortcut's icon.
The most cross-browser way to add a favicon is two steps:
Put an icon file at the site's root, named favicon.ico and using the same format Windows uses for icon files. (Some browsers can use PNG/GIF/JPG icons, but it seems IE in particular only likes honest-to-goodness .ICO files.) There are sites, like http://tools.dynamicdrive.com/favicon/ as mentioned in another answer, that will convert an image into an icon for you.
Make sure the page has the following HTML in its head:
<link href="/favicon.ico" rel="shortcut icon">
(Add a slash to self-close the tag if the document is XHTML.)
USE THIS:
<head>
<link rel="icon" type="image/png" href="logo.ico"/>
</head>