As you are now aware, your theme's stylesheet gives consistency throughout your sites pages and posts and saves time in editing your pages and posts. But what if you have 50 or 60 posts and pages and what to change font, font size, headers, etc. Instead of having to edit each page and post individually by inserting html code, you change the css accordingly. Job done!

But what if you just want to change a single paragraph's font face or font size? HTML! By inserting html code you can overule the css code for whatever you wish to change without affecting the css code.

So, lets have a look at changing the horizontal rule using html code. If you don't know html coding you can copy and paste the following code into your text editor wherever you want your horizontal to appear:

<hr style="width: 000px; height: 00px; background-color: #000000; margin-left: auto; margin-right: auto; margin-top: 00px; margin-bottom: 00px;"></hr>

You probably won't need all the above but you can delete it as required. For example, if your are happy with your horizontal rule in general but just want to reduce the width and center it, the html code would look like this:

<hr style="width: 100px; margin-left: auto; margin-right: auto;"><hr>

(Don't forget to change the digits to whatever width you want), your css code will do the rest and you should see this:

Remember the margin-left: auto; and margin-right: auto;? These will automatically center your horizontal rule.

If you want to align the horizontal left, the html code would look like this:

<hr style="width: 000px; margin-left: 0px;"></ hr>

By replacing margin-left in the above code with margin-right, your rule will automatically align right. If you want to change the border style, color, or width, you will have to make the appropriate changes in the main code.

May I suggest, if you're not conversant with html, you copy and paste the codes into a folder, you can then copy and paste them into your text editor wherever you wish them to appear in you page or post.

That's all folks, I hope you found this tutorial helpfu,if you did, a comment/like would be much appreciatedl, and good luck, if you have any problems give me a shout.



Join the Discussion
Write something…
Recent messages
YvonneBray Premium
Great tutorial on Horizontal rule. Great work.
Reply
Harrysastar2 Premium
Thanks, Yvonne, much appreciated.
Reply
vibol168 Premium
Hi Harry. Thank of your Lesson is really useful for me to use Horizontal Line. But i wonder my Dashboard doesn't appear like your lesson. it is mission some point like File, Edit, Insert and more. Could you please tell this problem, and other problem when I use Horizontal Line is no full. Thank
Reply
Harrysastar2 Premium
Hi Vebol, you need to be in visual mode to see File, Edit, etc. On your dashboard click on all pages or posts, open a page or post by clicking on it, click on Visual, not text, and you should see what you need, then just follow the training step-by-step. Hope this helps.
Reply
dunbar Premium
Hi Harry,it always seams so simple when someone else does it, thanks for a great training tip cheers Helen
Reply
Harrysastar2 Premium
Hi Dunbar, like they say, everything's simple when you know how. Glad you liked the training, thank you.
Reply
JewelCarol Premium
Thank you for the great training, Harry. :))
Reply
Harrysastar2 Premium
You're more than welcome , Jewel, thanks for your comment.
Reply
Loes Premium
This is great! Love it and bookmarked it! Followed you! I go to play with that! Solid, dashed, groove double etc. :)Thank you Harry!
Reply
Harrysastar2 Premium
Hi Loes, thank for bookmarking the training, glad you like it, I just thought I'd try to give a little bit back for all the good training I've received from members in the past. Following you.
Reply
Loes Premium
You're welcome Harry, follow back:)
Reply
Top