Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
akopein
tagDiv Member

Hi

I tried your solution . It works fine in my desktop. But when i view it in a mobile the alignment looks very bad. The previous user has also the same problem. I guess he dint test it in a mobile device. Is there some media queries we can use to get it correct in all devices.
This is my website http://theindiantelegram.com/

Mobile view
http://mobiletest.me/iphone_5_emulator/?u=http://theindiantelegram.com/

akopein
tagDiv Member

Oh never mind…i solved it by adding some custom JS and CSS.

http://jsfiddle.net/livibetter/HV9HM/

This is really helpful if anyone else wants to make the newsticker sticky

Custom js
jQuery(document).ready(function($) {
function sticky_relocate() {
var window_top = $(window).scrollTop();
var div_top = $('#sticky-anchor').offset().top;
if (window_top > div_top) {
$('#sticky').addClass('stick');
} else {
$('#sticky').removeClass('stick');
}
}

$(function () {
$(window).scroll(sticky_relocate);
sticky_relocate();
console.log("hello");
})
});

Custom CSS:

#sticky.stick {
position: fixed;
top: 100px;
width: 860px;
}

Copy both stuff and place it in the themepanel. Add the following elements anywhere to echo the newsticker

<div id="sticky-anchor"></div>
<div id="sticky">
<?php echo do_shortcode('[td_block_trending_now]');?>
</div>

akopein
tagDiv Member

Hi this works..thanks for looking into it..But i have another problem now

http://content.screencast.com/users/akopein/folders/Default/media/0cf9cf7d-0714-4b01-9b3f-fc94678e107f/1.png

I had given a background colour and it now overlaps with the newsticker. I would really appreciate if you got any solution for that

Viewing 3 posts - 1 through 3 (of 3 total)