a cat named Tempest (isabeau) wrote in lj_userdoc,
a cat named Tempest

Rewrite for 140

FAQ 140 (I am a 1337 override writer but you meanieheads aren't letting it work) has for a while been begging me to write it; it's hard to find information, especially since most of the FAQ feels like "omgCSS" and other problems, like the website thing, are kind of buried.

Suggestions/etc welcome.

Title: Why won't my overrides work?

Summary: In order for overrides to work properly, they must have the correct override syntax; if they include any CSS (Cascading Style Sheets) code, this must also be correct. This is the worst summary bit evar, plz send help.


Override Syntax

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.

Multiple Overrides

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:

<style type="text/css">
body {
background-image: url(http://www.example.com/image.jpg);

<style type="text/css">
a:hover {
cursor: crosshair;

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 first.

CSS Syntax

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:
    <style type="text/css">

  • 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:
    body {

  • The CSS declaration that should be applied to that element, with semicolon (;) at the end:
    background-image: url(http://www.example.com/image.jpg);

  • 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:
<style type="text/css">
body {
background-image: url(http://www.example.com/image.jpg);

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.

Website overrides

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.

Style-specific overrides

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-specfic 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.

[same further reading as existing]
Tags: cat-s1, faq140, status-resolved

  • FAQ232

    There is a typo (or two) in FAQ232. I'm talking about the following sentence: Ddd them to your Friends list them with the Add Friend button at…

  • New FAQ: How do I deal with spam?

    This FAQ is meant to tie together all of our spam-related information, currently spread over several different categories. Ideally, I'd like to have…

  • Identity Account FAQs

    As LiveJournal Support regularly uses the term identity accounts both in answers to users and amongst themselves, and some system pages refer to…

  • Post a new comment


    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded