Understanding the HTML

Below is a diagram of the HTML structure of a generic chat and a list of every key CSS selector.

HTML Structure

This diagram shows a generic HTML structure of a chat with 2 messages. One from an anonymous user and a reply from the owner (you). When building, the use of inspect element is strongly encouraged.

Chattable
Username
Message Body
Username
Message Body

CSS Selectors

This is current most comprehensive list of every CSS selector available for Chattable chats

CSS Selector Description
.allMessagesSelects every message, which contains a .senderInfo & .msgBody
.allMessages.containsOnlyEmojis .emojiSelects the emojis in a message if that message only contains emojis.
.allMessages.pmSelects any visible private messages.
.msgWrapperSelects an invisible wrapper around every .allMessages element
.sentSelects all .allMessages elements that were sent by you
.receivedSelects all .allMessages elements that were not sent by the current account/device
#top_bannerSelects the entire top banner that yields the Chattable logo
.senderInfoSelects each element that contains message sender information like their name & badge
.msgBodySelects the message body on each message
#backgroundSelects the background area in which the messages are rendered inside
#inputSelects the user input field. This element is a content-editable DIV and not a typical input element. Be aware of this when styling
#input:empty::beforeSelects the placeholder for the input element, change the content property to change the text.
#settingsSelects the settings icon. Ensure this element is easily visible to improve user experience
.modSelects all rendered moderator badges
.ownerSelects all rendered owner badges
.betaSelects all rendered beta tester badges
#timestampSelects all timestamp elements. Ensure these elements can be easily read to improve user experience
.replySelects all blockquotes used in messages
.ctxMenuOptionSelects all elements used as options in the menu that pops up when right-clicking/interacting with a message. Ensure these elements are readable for the best user experience.
#settingsWindowSelects the background of the settings menu
.dialogueModalSelects all popup dialogue modal boxes, like the one used in the !online command.
#loadMoreSelects the "Load More" button at the top of chats. This button is visible only if the chat contains more than 15 messages and appears at the top of the message feed.
#scrollToBottomSelects the "Scroll to Bottom?" button at the bottom of the screen. This button is visible only if the user is not scrolled to the most recent message.
.pinnedSelects all pinned messages, if any
#replyBannerSelects the banner that pops up above the textarea when a user goes to reply to a message. Ensure this element can be easily read for the best user experience.
.highlightSelects all pinged usernames. Customizing this will alter the style seen when someone @'s you. Note that only the pinged user sees the customized style.
.emojiSelects all emojis in chat. Can be used to resize or animate emojis
#emojiTraySelects the background for the emoji tray when visible
.emojiInGridSelects the emojis displayed inside the emoji tray, if any are present.
#emojiTrayToggleSelects the button that toggles the emoji tray open/close.
#is_typingSelects the bubble that appears when someone is typing in chat
#shadowSelects the tutorial wrapper. You can hide this element if you want to prevent the tutorial from running for new users.
Elements exclusive to the Settings Menu...
#settingsMenuSelects the background/wrapper of the settings menu
#accountSelects the "goto account" button in the upper right corner of the settings menu
#nameSelects the username input field in the settings menu
#dltranscriptSelects the Download Transcript link/button on the settings page.
#saveSelects the "save changes" button in the settings menu
#closeSettingsBtnSelects the "Close" button at the bottom of the settings menu