Difference between pages "TipOfTheDay" and "Centering & Formatting Text on Your Web Page"

From TheBestLinux.com
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
= '''Tip of the Day''' =
+
This is how you can format text on your web page, making it centered, changing the font size and color, and other options.  Here is an example of how I change font alignment, size and color on the fly, without having  to manage a separate CSS file:
<br />
 
* May 28, 2021
 
'''The Issue:'''
 
 
<pre style="color:blue">
 
<pre style="color:blue">
/etc/resolv.conf - Why do my DNS lookups not work, or sometimes seem to work, and other times don't.
+
<p style="text-align:center; font-size:42px; fg-color:red;">
 +
Here is the text which will be now be centered with a font size of 42 pixels and green in color.
 
</pre>
 
</pre>
<br />
 
  
Today's tip of the day is something I just figured out, after having it bug me for many years, and only just now confirming the resolution!
+
And here is the resulting line with the style modified with our example:
<br /><br />
+
<p style="color:red"; "text-align:center"; "font-size:42px;" >Here is the text which will be now be centered with a font size of 42 pixels and RED in color.</p>
 
 
Unfortunately, '''Network Manager''' often creates a new /etc/resolv.conf file with the "search" statement preceding the "nameserver" statement(s)!  This causes intermittent DNS lookup failures, especially on the local network!  This has caused me years of frustration, so my hopes are this will help others avoid my past frustration! :-)
 
<br /><br />
 
 
 
Here is an example of what '''Network Manager''' can create, causing my local DNS queries on my own internal BIND9 DNS VM servers to fail:
 
<pre style="color:blue">
 
# Generated by NetworkManager
 
search dawgland.com
 
nameserver 192.168.200.103
 
nameserver 192.168.200.104
 
nameserver 4.2.2.4
 
 
 
</pre>
 
<br />
 
 
 
Through trial and error using multiple machines(VM's actually) with multiple distros of Linux, both Red Hat and Debian based, I discovered that the order of the statements within the /etc/resolv.conf file make a HUGE differnce!
 
<br /><br />
 
 
 
'''The Solution:'''
 
<br />
 
The nameserver statements MUST come before the "search" statement!!!  Such as this example:
 
<pre style="color:blue">
 
# /etc/resolv.conf - Created manually on 05-28-2021
 
nameserver 192.168.200.103
 
nameserver 192.168.200.104
 
nameserver 4.2.2.4
 
search dawgland.com
 
 
 
</pre>
 
 
 
<br />
 
 
 
The changes take effect immediatelly, without the need to reboot or restart any services. I hope you found this tip of the day useful!
 
<br /><br />
 

Revision as of 05:10, 15 December 2022

This is how you can format text on your web page, making it centered, changing the font size and color, and other options. Here is an example of how I change font alignment, size and color on the fly, without having to manage a separate CSS file:

<p style="text-align:center; font-size:42px; fg-color:red;">
Here is the text which will be now be centered with a font size of 42 pixels and green in color.

And here is the resulting line with the style modified with our example:

Here is the text which will be now be centered with a font size of 42 pixels and RED in color.