Skip to content

Instantly share code, notes, and snippets.

@lelandf
Last active April 2, 2016 12:57
Show Gist options
  • Save lelandf/312f89e3fac9dc91634c09c784c12aa1 to your computer and use it in GitHub Desktop.
Save lelandf/312f89e3fac9dc91634c09c784c12aa1 to your computer and use it in GitHub Desktop.
.widget_recent_entries .widget-title,
.widget_recent_entries ul {
line-height: 48px; /* Height of the news ticker, with text vertically centered */
}
.main-navigation {
margin-top: 48px; /* This should equal the height of the news ticker (48px, set above) */
}
.widget_recent_entries {
background: #eee; /* Light gray to constrast white background color of navigation bar below */
max-width: 100%; /* Not necessary for all themes. This overrides a responsive Owari style */
overflow: hidden; /* Make sure scrolling text is not visible outside the container */
position: absolute; /* Absolute positioning breaks this out of the flow of the layout */
top: -96px; /* This is the sum of the height of the news ticker (48px) and the height of the navigation bar below (48px) */
left: 0; /* Make sure the ticker starts at the far left */
width: 100%; /* Make sure the ticker spans the entire width of the container */
}
.widget_recent_entries .widget-title {
background: #ed232a; /* Red background */
color: #fff; /* White text */
margin: 0; /* Reset normal Owari widget title style */
letter-spacing: 2px; /* Optional */
padding: 0 12px; /* Add padding to the left and right */
position: absolute; /* Make sure this doesn't get in the way of the scrolling list of links */
z-index: 1; /* Make sure this displays above the scrolling list of links */
}
.widget_recent_entries .widget-title,
.widget_recent_entries ul,
.widget_recent_entries li {
display: inline-block; /* Makes sure everything in the formerly vertical widget is now horizontal */
}
.widget_recent_entries ul {
white-space: nowrap; /* Make sure latest news links display on one line */
width: 100%; /* Make sure the latest news links span the full width of the container */
}
.widget_recent_entries li {
padding-right: 1em; /* Add space to the right of each latest news item */
}
.widget_recent_entries a {
color: #000 !important; /* Make the links black */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment