How make text before ul to come in single line in html?
Tags: jquery,html,css
Problem :
I am using jquery li scroll plugin in my site for creating news ticker and this jqueryli scroll plugin needs your news to be in <li>
tag and this plugin works fine for me but the problem is that I want to put text before news ticker.
I want output like NEWS FEED : actual news
currently I have achieved "actual news" and when I tried to put NEWS FEED label in fron of ticker it gives my problem.
The problem is that when I put NEWS FEED label in front of ticker, the ticker news goes to the next line and I get out out as :
NEWS FEED :
"actual news "
I have used code :
<div>NEWS FEED
<ul id="ticker01">
<?php foreach ($news_array as $single_news) : ?>
<li><span><?php echo $single_news; ?><span></li>
<?php endforeach; ?>
</ul>
<div>
How I can achieve NEWS FEED label and news ticker in single line ?
I have edited css as follows:
.tickercontainer { /* the outer div with the black border */
width: 850px;
height: 32px;
margin-left: 100px;
padding: 0;
overflow: hidden;
}
.tickercontainer .mask { /* that serves as a mask. so you get a sort of padding both left and right */
position: relative;
left: 10px;
top: 8px;
width: 718px;
}
ul.newsticker { /* that's your list */
position: relative;
left: 750px;
font: bold 10px Verdana;
list-style-type: none;
margin: 0;
padding: 0;
}
ul.newsticker li {
float: left; /* important: display inline gives incorrect results when you check for elem's width */
margin: 0;
padding: 0;
background: #fff;
}
ul.newsticker a {
white-space: nowrap;
padding: 0;
color: #ff0000;
font: bold 10px Verdana;
margin: 0 50px 0 0;
}
ul.newsticker span {
white-space: nowrap;
padding: 0;
font-family: "Times New Roman";
font-size: 16px;
color: #ff0000;
margin: 0 50px 0 0;
}
/* liScroll styles */
here is problem fiddle : click here
Solution :
Okay Done.
Works: http://jsfiddle.net/p6akP/2/
#outerdiv{
float:left;
width:1000px;
}
.tickercontainer { /* the outer div with the black border */
width: 850px;
height: 32px;
float:right;
padding: 0;
overflow: hidden;
}
.tickercontainer .mask {
top:0;
//other styling you have
}
<div id="outerdiv">NEWS FEED
<ul id="ticker01">
<li><span>10/10/2007</span><a href="#">The first thing ...</a></li>
<li><span>10/10/2007</span><a href="#">End up doing is ...</a></li>
<li><span>10/10/2007</span><a href="#">The code that you ...</a></li>
</ul>
<div>
CSS Howto..
Add the following css below your css .dropDownBox option { font-size: 13px; color: #3b3b3b; padding: 5px; background: -moz-linear-gradient( top, #f0f0f0 0%, #d6d6d6); background: -webkit-gradient( linear, left top, left bottom, from(#f0f0f0),...
You can try something like this: Working Example #login-form input[type="email"], #login-form input[type="password"] { border:none; /* clear previous borders */ border-bottom: 1px solid #dcdcdc; /* add bottom border */ padding: 12px...
You can try something like this http://jsfiddle.net/ZG2BL/ The idea is, to set the li that holds dropdown ul as position:relative; and the ul dropdown as position:absolute; and give it a...
I added this: #menuh ul li:hover a {color: black !important; border-bottom: 1px dashed #C1D9F0 !important; } #menuh ul li:hover li a {color: #505050 !important;} #menuh ul li:hover li a:hover {color:...
DEMO HTML <div class="arrow-down"></div> css .arrow-down { width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent; border-top: 20px solid #f00; } Updated Demo HTML <div id="div1"><div class="arrow-down"></div></div>...
*{ padding: 0; margin: 0; box-sizing: border-box; } body{ padding: 50px; } div { background: #1589A1; padding: 20px; position: relative; color: #fff; width: 100px; min-height: 70px; font: 600 16px...
When the html is rendered in IE7, does it properly show <span class="liforrent" id="lblPrice"></span> or something similar? If so, what does your css look like? Are you using something like...
The problem is with your source image. This has a second gradient (top-bottom as well as left-right) in it, if you look closely: ...
I would do something like this for the first half. And then for the second half, I would use some kind of media query to hide the nav and then...
The easiest way is probably to ignore that <div>, create a new one with the class you care about and check its style attributes. You need to add it to...
In order to get text to appear on the heart, you need to set the heart container as relative and the text inside of it as absolute as shown below....
Flexbox can do that: .content { padding: 0 35px; } .row { display: flex; /* columns now equal height */ } .first-column { border: 1px solid; height: 200px; flex: 10;...
I'm not sure if you have more CSS in your document but you're missing a bit of CSS to actually make your menu horizontal. You can make it horizontal by...
Just use the meta tag that automatically proportions everything based on the viewport: <meta content="width=device-width, initial-scale=1.0" name="viewport"> Place the above line on your <head> tag, and the margins, padding, and...
In a nutshell you have a left column and a right column. There can be no relationship between the content of the two columns. I would discard the concept of...
I think you are getting confused about what the a:active CSS selector does. This will only change the colour of your link when you click it (and only for the...
You cannot do as you want with CSS. That said, you can use the below for a pure CSS menu: HTML: <ul id="nav"> <li> <a href="">Main Item 1</a> <ul> <li>Sub...
You can use certain CSS selectors to change CSS properties on selected text. (I tested this and it worked in Firefox, Safari, Chrome, and even Konqueror, but not IE). Example:...
This is the solution I found for my question: Filling space with Flexbox
#buttons input:nth-child(2), #buttons input:nth-child(3){ margin-left:5px; } does this work for you ? or simply: #Cancel, #add{ margin-left:5px; } With , seperation you start a complete new CSS Selector and combine...
I could solve this with the new Flexbox Attribute: CSS: // Flexbox vertical alignment to bottom .va-bottom { align-self: flex-end; } HTML: <div class="large-6 column va-bottom"> <%= image_tag("landing_page_3", alt: "landing...
You need to move your facebook link to a seperate <ul> list within your navbar and pull it right using navbar-right. <ul class="nav navbar-nav"> <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li> <li><a...
here is a visual of my result: and the code (as minimal as possible): <head> <title></title> <style> div.main { clear: both; } div.main > div.column { position: relative; width: 100px;...
You need to include style for "visited" as well. a.viewall, a.viewall:visited { color: #ffffff; } More Reading -- includes styling unvisited, visited, hover, and active links....
I've used: #myItem { position: fixed; top: 50%; left: 50%; width: 100px; height: 100px; margin-top: -50px; margin-left: -50px; } .... before, hope it helps...
It would be useful to know what kind of shape that is. I am cutting an ellipse in half for my solution. This was kind of fun. Edit: Changed my...
.ContainerTitle { display: block; /* WHY IS THIS^ NOT WORKING?????*/ background: #fff; float: left; padding: 15px; padding-left: 15px; border: solid 1px #000; font-size: Large; color: #000; text-align: left; cursor:...
Images are inline by default. Try adding: display: block to the images....
The way Stack Overflow itself solves this problem is to add a version parameter to the CSS and JS URLs, which refer to the version of the referenced files: <link...
I think the problem is the fixed padding of 20px. Try using a percentage here too, for example padding:0.24%