LiveJournal overrides consist of three required elements, in order to work correctly. The following example uses the override to change the text of the "Read Comments" link, to demonstrate the required elements:
- An opening override tag, including the name of the variable that the override applies to:
- The contents of the override:
<a href="%%urlread%%"><b>%%messagecount%% thought%%mc-plural-s%%</b></a>|
- A closing override tag, including the name of the variable:
The opening and closing tags must be on separate lines, and the <= marker must be included in the appropriate place on each line. If these tags are missing or incorrect, LiveJournal does not know what variable the override should apply to, and so does not use it.
For some short overrides, it is possible to have a one-line version, consisting of the variable name, a => marker, and the contents of the override. This is mainly used for extremely short overrides, such as the override
to change the number of entries per page. If you use this format, you will need to make sure that the text does not wrap onto a second line.
If you have overrides for several different variables -- for example, if you are using a GLOBAL_HEAD override to add CSS information, and LASTN_TALK_LINKS and LASTN_TALK_READLINK overrides to change the comment links -- they must be separate, so that one override is closed before the next one begins. If you try to place an override of one variable inside another override, the customizations will not work correctly. (The same problem will occur if you forget to close an override block.) for example, if you want to have a GLOBAL_HEAD override to add a background image, and a LASTN_HEAD override to use a custom cursor for your Recent Entries page only, they would need to be entered like this:
Note that the GLOBAL_HEAD override is closed (with <=GLOBAL_HEAD) before the LASTN_HEAD override is opened (with LASTN_HEAD<=). The order of the overrides does not matter; you can have the GLOBAL_HEAD override first, or the LASTN_HEAD override first, and they will have the same effect, as long as they are separate.
However, it is not possible to have multiple overrides of the same variable. If you have two separate GLOBAL_HEAD overrides, only one will apply. If you would like to include customizations involving the same variable -- for example, if you have a GLOBAL_HEAD override to add a background image, and a second GLOBAL_HEAD override to change the font for your journal -- you will need to merge them together
Correct CSS syntax requires certain elements to be included. If any of the elements are missing, your journal may not display, or may not appear as you want it to.
- A style sheet declaration:
- Optionally, an "opening comment" tag, so that older browsers do not attempt to render the stylesheet as HTML:
- The HTML element you wish to declare, with opening braces:
- The CSS declaration that should be applied to that element, with semicolon (;) at the end:
- Closing braces:
- A "closing comment" tag, required if you have an opening one; forgetting this after using an opening comment will stop your journal displaying:
- An end style sheet declaration:
Placing this all together, it looks like this:
This is simply an overview of CSS. For further information, including lists of what HTML elements can be declared and what CSS can be used, you will need to consult a HTML and CSS reference.
Some customizations involve *_WEBSITE overrides (LASTN_WEBSITE, FRIENDS_WEBSITE, DAY_WEBSITE, CALENDAR_WEBSITE). However, these overrides will only work if you enter a web address in the Web Page URL field on your Edit Profile
page. Any valid web address will work in this field; if you do not have a website of your own that you want to use, you can simply use the URL of your journal
If you have used a tutorial to create a particular effect, such as from the howto
journal, you will need to make sure you have used the tutorial that corresponds to your journal style. Some tutorials are style-specific and will not work properly if you do not use the one appropriate for your style. (Many style-specific tutorials will state which style(s) they work with, to avoid confusion or problems.)
Most notably, overrides for changing comment link text (*_TALK_LINKS and *_TALK_READLINK overrides), and overrides for changing the width or position of your journal content (*_HEAD overrides with width or margin information), are extremely style-specific. An override that will work for one style may break a different style. You will need to make sure that you are using the correct override for your style, or will need to change your style to fit the override.
Finally, if your overrides are in the correct format and are still not displaying on your journal, make sure that you have saved the overrides after entering them, and then refresh your journal. Your browser may be displaying a cached, or locally stored, copy of your journal
. Refreshing your journal will cause your browser to pick up the most recent copy of your page from the servers.