Hello Kitty, Destroyer of Worlds (rahaeli) wrote in lj_userdoc,
Hello Kitty, Destroyer of Worlds
rahaeli
lj_userdoc

FAQ proposal: "My overrides won't work. What's wrong?"

Proposed FAQ as described in this post in customization.


My overrides won't work. What's wrong?

The most common problem with overrides is invalid CSS syntax and/or improper construction of LiveJournal overrides. In order for overrides to function correctly, they must not only be proper CSS (Cascading Style Sheet) syntax, but be in the proper format for use on LiveJournal.

Proper CSS syntax involves the following elements. (As an example, we will use the override for adding a background image.) If any of these elements are missing, your style sheets will not function properly, and your journal may not display.


* A style sheet declaration
<style type="text/css">

* 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
-->

* An end style sheet declaration
</style>

Placing this all together, it looks like this:

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


This is simply an overview of CSS. For further information, including lists of what HTML elements can be declared and what CSS specifications can be used, you can consult a HTML and CSS reference.

If you want to use more than one CSS declaration in a single override, you must merge those declarations together. For more information on override merging, see http://www.livejournal.com/talkread.bml?journal=howto&itemid=926 .

To use CSS on LiveJournal, you must 'wrap' the CSS declarations in proper override format ( http://www.livejournal.com/talkread.bml?journal=howto&itemid=4516 ). For instance, to use our background override as a GLOBAL_HEAD override (causing it to display on all pages of your journal), you would need to enter this:

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

Another common problem that will cause overrides not to work is if you try to place another override (such as, for instance, comment links) inside an existing override. Each override block must be closed before you begin a new one. For instance, a background override with a custom cursor on your LASTN page only would have to be entered like this:

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

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

Note that the GLOBAL_HEAD override is closed before the LASTN_HEAD override is opened.

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.

Paid and permanent account holders, as well as early adopters, can create custom styles rather than using overrides. This process is described in http://www.livejournal.com/support/faqbrowse.bml?faqid=128 .

Further references:

What are overrides? How do they work?
http://www.livejournal.com/support/faqbrowse.bml?faqid=124

In what other ways can I customize my journal?
http://www.livejournal.com/support/faqbrowse.bml?faqid=138
Subscribe

Recent Posts from This Community

  • Post a new comment

    Error

    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 

  • 8 comments