Is there a precise definition of "attitude"? After going through some literature on values, beliefs and attitudes, I am confused. Values and beliefs are somewhat more clear, but what exactly is an attitude? What does it contain? 

Is "I like X" already an attitude towards X? Is anything beyond "like" also an attitude, such as "I find X boring"? If yes, then where is the border to related concepts (and which concepts are related - is an emotion towards an object an attitude)? If an attitude is only restricted to being a positive or negative disposition towards an object, how does it differ from a preference? 

Update Nick Stauner's answer includes a citation claiming that an attitude is not affect. But the same citation insists that an attitude is about favorability, and if we reduce attitudes to "I like X", how is "like" not considered affect?
Have you considered Wikipedia's Definitions of attitude page? Here are some excerpts with which I agree...

An attitude can be defined as a positive or negative evaluation of people, objects, event, activities, ideas, or just about anything in your environment, but there is debate about precise definitions. Eagly and Chaiken [(1998)], for example, define an attitude &quot;a psychological tendency that is expressed by evaluating a particular entity with some degree of favor or disfavor.&quot; Though it is sometimes common to define an attitude as affect toward an object, affect (i.e., discrete emotions or overall arousal) is generally understood to be distinct from attitude as a measure of favorability [(Ajzen, 2001)]. [Emphasis added.]

To me, this distinction means that affect exists apart from attitudes at the level of the person (e.g., &quot;I feel [insert affect word $X$ here]&quot;), but is influenced by affect at the level of the object (e.g., &quot;I feel [insert affect word $Y$ here] toward [insert object $Z$ here]&quot;). Thus affect at the object level would more or less constitute an attitude, yet remain distinct from affect per se, which can occur at many levels, and not necessarily be directed toward any specific object. Examples of $X,\ Y,\ \&amp;\ Z\ $ could include:
$$X=Y=\text{"resentful"};\ Z=\text{"Obama"}$$
Thus, &quot;I feel resentful,&quot; states an affect, whereas, &quot;I feel resentful toward Obama&quot; states an attitude. However, you might prefer to consult Ajzen's (2001) own reasoning on the matter (TBH, I haven't).
Further considerations from Wikipedia:

This definition of attitude allows for one's evaluation of an attitude object to vary from extremely negative to extremely positive, but also admits that people can also be conflicted or ambivalent toward an object meaning that they might at different times express both positive and negative attitude toward the same object. This has led to some discussion of whether individual can hold multiple attitudes toward the same object [(Wood, 2000)].
Whether attitudes are explicit (i.e., deliberately formed) versus implicit (i.e., subconscious) has been a topic of considerable research. Research on implicit attitudes, which are generally unacknowledged or outside of awareness, uses sophisticated methods involving people's response times to stimuli to show that implicit attitudes exist (perhaps in tandem with explicit attitudes of the same object). Implicit and explicit attitudes seem to affect people's behavior, though in different ways. They tend not to be strongly associated with each other, although in some cases they are. The relationship between them is poorly understood.

References
Ajzen, I. k. (2001). Nature and operation of attitudes. Annual Review of Psychology, 52, 27–58.
Eagly, A. H., &amp; Chaiken, S. (1998). Attitude structure and function. In D.T. Gilbert, Susan T. Fisk, and G. Lindsey (Eds.), Handbook of Social Psychology, pp. 269–322. New York: McGowan-Hill.
Wood, W. (2000). Attitude change: Persuasion and social influence. Annual Review of Psychology, 51: 539–570.