newfont in my custom css doesnt work
-
.newfont { font-family: Arial, sans-serif; font-size: 3; color: #000000; }Using it as follows but doesn’t work.
<p class=”newfont”> example </p>
-
You’re missing a unit of measure for the font-size – but as to what other problems it may have, is impossible to say without seeing a live page.
(link edited)
Same result when changed mycustom css to
p2{ font-family: Arial, sans-serif; font-size: 3px; color: #000000; } <p2> example </p2>What is “<p2>”?
Trying to define p2, a new font.
How do I define a new font and use it?What is a p2? A second paragraph?
If you edit links, it’s much harder for anyone to help you.
you cannot define your own new html tags.
with your initial idea about using css classes seems feasible; why it did not work for you is difficult to tell without being able to investigate those codes in your live site.
neither your custom css plugin, nor your theme ‘startupwp’ should get into the way of that code.also, this seems to be more a general question about using html and css, and about troubleshooting formatting issues for instance using a browser inspection tool, and might be better suited for a webmaster or CSS forum.
I don’t see anything WordPress-specific in your problem.
I am not able to modify font on a page even if I use
<font size=3 face=”Arial”> Example text </font>in the text of the page.So, I specified a “newfont” in “My custom CSS” plugin as follows
newfont { font-family: Arial; sans-serif; font-size: 3; color: #000000; }I then used it as follows in the text of the page to modify the font of the text, but the below expression simply shows as is on the webpage and doesn’t affect the font.
<p class=”newfont”> example text </p>This is not valid code:
<font size=3 face=”Arial”> Example text </font> in the text of the page.And you have many CSS syntax errors – try this:
.newfont { font-family: Arial, sans-serif; font-size: 3px; color: #000000; }If that does not work on your site, then something else is going on with your CSS or HTML – and there is no way to help with that without seeing the page live.
It also looks like you are using curly quotes which can be problematic.
<font size=3 face=”Arial”> Example text </font>– this worked to change in the font in the main site. The issue I described above is at a subdomain of the main site.Also tried the corrected code
.newfont { font-family: Arial, sans-serif; font-size: 3px; color: #000000; }and then using it as
<p class=”newfont”> example text </p>
but doesn’t work.If that does not work on your site, then something else is going on with your CSS or HTML – and there is no way to help with that without seeing the page live.
The code you say works is deprecated and should not be used (whether or not it works):
http://www.w3schools.com/tags/tag_font.asp
Perhaps try http://csscreator.com
link edit — > “about us” is where i tried .newfont in custom css. what could be wrong in it?
Are you copying from Word? Have you looked at the page? The HTML code is visible on the page – it’s invalid HTML:
<p><p class=”newfont”><font size=3 face=”Arial”></p> <p> </p> <p>We provide tools and means necessary to empower people from under-served communities in (re-) building their lives. We act as a facilitator of their access to the existing resources in the community that people can avail themselves to in order to grow and make a future for themselves. Thus, we exist to organize, facilitate, inform, and empower the under-privileged communities so that they can build their lives, growth, and support systems – their ecosystems. </font></p> <p></p></p>ah, fixed it. I was making changes in visual instead of html, thanks.
If there’s a shorter way to change font than
<p class=”newfont”> .... </p>
then that could be useful.
The topic ‘newfont in my custom css doesnt work’ is closed to new replies.