02 Aug 12 6:25 am
Website Coding:Today's websites usually consist of 3 or 4 types of code. The basic markup tags are HTML (Hypertext Markup Language). In Wordpress, you can see the HTML markup tags in the editor's "HTML" view tab.
But there is also CSS (Cascading Style Sheets). In a static website, CSS is used in the header of any page and/or in a separate page called a "Style Sheet", with filename extension ".css".
Then there is JavaScript for special programming functions, like slide shows, or menu systems and a lot more. And last, there may be PHP code to integrate the website pages with data stored in a database.
WordPress is a CMS (Content Management System) using a MySQL database. So it has all of the 4 types of code.
Learn a Little Code:You will be a better marketer and website/blog builder if you learn at least some HTML and CSS. I've used those daily for years, and databases too. But I'm still learning PHP.
If you're code illiterate, you'll be forced to use everything with the built-in default settings - which are far from perfect in most WordPress themes. And there will be things you want to do but can't. And things that need fixing, but you won't know how. Coding brings those abilities - and loads more creative power.
You'll not have enough control to make your sites or blogs look professional - even simple things like controlling the margin widths, without some coding knowledge. As you can tell, I think only knowing marketing is not enough. Of course you can hire code experts - if you have the budget. But I'm a big believer in knowing all you can - even if it's just to make you better at managing the work of others.
My advice is to buy a good book on HTML and one on CSS. Neither of them are difficult and both use English-like tags. And there is a huge amount of code help online. Simply do a Google search on any code snippet you don't understand.
CSS Margin Width:For example to set your margins you might use this line of CSS:
- Code: Select all
margin: 0 20px 0 40px;
That sets the 4 margins (clockwise from the top) to:
Top margin = 0px (leaves it at whatever the default is, or sets it to zero)
Right margin = 20 pixels
Bottom margin = 0px
Left margin = 40px (then you indent paragraphs more from there, where you want).
After setting this, you simply look at the post or page in a browser, as your audience sees it. If you don't like the results, it takes only seconds to adjust those numbers to your liking and save the file again for another look.
Besides "margins", sometimes you need to modify "Padding".
The trick is knowing where to put this line of CSS. It belongs in your style sheet in a certain location, probably in a section labeled "Paragraph", or "Posts" or "Pages" defining the paragraph styles of your posts and/or your pages.
CSS Editing in WordPress:In the WordPress dashboard, you can find the style sheet in "Appearance > Edit > style.css" or some similar .css filename, depending on what the theme author named it.
I recommend the "Advanced Code Editor" plugin for WordPress. It's very good and the built-in CSS editor (without the plugin) is very weak. The plugin numbers lines, does searches, uses colors for the codes and a lot more. It's a "must have" for editing code.
It's such a shame that the HTML editor in WordPress is so pathetic - not even line numbers. Sometimes I have to copy and paste HTML for WordPress into Adobe Dreamweaver to create tables or other stuff that are too difficult in WordPress editor - then paste it back into WordPress - that's how bad the WordPress editor is.
Happily the editor gets a bit better with each new version of WordPress. Not many versions ago it was unusable. And there are more editor enhancing plugins available all the time.
And don't even get me started on how WordPress messes with your HTML code once you pop back into the editor's "View" tab from "HTML" view! There are plugins to tame that bad behavior, but I haven't tried them because I don't have time to re-write all my posts and pages. I think next time I start a WordPress blog, I'll use that plugin and do all my HTML manually, instead of letting WordPress mess it up.
Hope this helps... (it helped me let off some steam anyway)
_jim coe