I have a website hosted on Github Pages, using Jekyl with the Lanyon theme. However, no matter how I fiddle with the CSS, I can't seem to get the code blocks to have a horizontal scroll bar. By default they wrap, and I was able to get the text to extend beyond the box, but I can't get a scroll bar.
The first code block on this page has several lines that wrap: http://nicktobey.me/2015/07/29/monads/
I tried every suggestion at How to support scrolling when using pygments with Jekyll, but none of them worked.
With Jekyll 3.4.0 and Poole, Lanyon, I was able to get the horizontal code scrolling right by adding the following CSS:
pre.highlight {
word-wrap: normal;
overflow-x: auto;
white-space: pre;
}
Related
I'm trying to use Bootstrap 4 Progress component. I need it to be between words in a sentence. As it is designed to cover the whole row, I'm trying to make it a smaller block so that I can put it between words. I minimized the size changing its width, but for some reason, it still has margin, but the developer tool shows there is no any margin.
I don't know how I can handle the margin thing. Is there anything hidden configuration from Bootstrap 4?
Weird. I didn't see the margins you mentioned on my developer tool.
Anyway, if you want the progress bar to be between words, you can set its display: inline-block;. Optionally you can assign a width to it as well:
span.progress {
display: inline-block;
width: 12rem; /* optional */
}
fiddle: http://jsfiddle.net/aq9Laaew/255749/
I have managed to embed a PowerBi Dashboard into a webpage.
Unfortunately, it looks hideous. For example, the padding is ridiculous; The title is stuck in the top-left corner, which I'd like to remove; all the content is loaded into an iFrame, which if I do not set the height and width, makes the dashboard near-invisible and non-responsive (in terms of window scaling); nothing is centred...
I have tried overriding the CSS. For example, I tried to set the display: none !important; property on the header (to remove the title), but it has no effect. I also tried changing the background color of the iFrame from grey to match the color of the webpage, but that too did not work.
Does anyone know how I can style my PowerBI dashboard and embed it without an iFrame (is this even possible?)?
As far as I know, at the moment, it's not possible to embed anything from PowerBI to a web page without an IFrame.
Do you really need a dashboard, maybe a report would do it? At least you'd be able to place the components as you like.
I had the same issue. I managed to use CSS to re-style the iFrame for both reports and dashboards.
I'm using an angular project and added the CSS to my component that is displaying the Iframe.
border-width: 0; //Removes Iframe horrible border
I also adjust the height, width and position.
If you struggle to find what element to change the CSS, use the inspect element in Chrome and test by changing some CSS on each element.
I was able to hide and change the position of the title when I found what div it was in with:
visibility: hidden; //true to show
text-align: centre; //left or right
I am trying to customize the default scrollbar that appears in the Side Menu, along with the scrollbar in the page itself but am unable to do so. I have already referred to This but it does not seems to be of much use for the page and have got no clues about customizing the scrollbar in the side menu as additionally i need to reduce the space between the elements in sidemenu.
I also tried to hide the scrollbar with the following code but was of no use.
.no-scroll .scroll-content{
overflow: hidden;
}
You can add the following styles in app.scss
::-webkit-scrollbar {
width:0px;
}
It will reduce the size of the scrollbar to zero.
I just noticed that many css plugins, when setting the page overflow to hidden (for example), they use to set it both to html and body, like this:
html, body {
overflow: hidden;
}
For example, fullpage.js does like this.
What is the exact difference between setting it to the body and the html?
Is it a cross-browser trick?
This is a CSS trick to prevent unwanted scroll bars, particularly horizontal bars. What it prevents is anything wider than the html or body being displayed therefore preventing the scrollbars. Here is an indepths csstricks article: https://css-tricks.com/findingfixing-unintended-body-overflow/
However you will notice right at the end, he mentions that putting the overflow hidden on the body (and html) is not recommended.
In the case of fullpage.js, it is fine because they specifically trying to hide the scroll bars so that their animations can bring in the content that is off screen.
I have a site I made really fast that uses floats to display different sections of content. The floated content and the content that has an additional margin both appear fine in FF/IE, but on safari one of the divs is completely hidden. I've tried switching to padding and position:relative, but nothing has worked for me. If I take out the code to display it to the right it shows up again but under the floated content.
The main section of css that seems to be causing the problem is:
#settings{
float:left;
}
#right_content{
margin-top:20px;
margin-left:440px;
width:400px;
}
This gives me the same result whether I specify a size to the #settings div or not. Any ideas would be appreciated.
The site is available at: http://frickinsweet.com/tools/Theme.mvc.aspx to see the source code.
I believe the error lies in the mark up that the color picker is generating. I saved the page and removed that code for the color picker and it renders fine in IE/FF/SF.
Have you tried floating the #right_content div to the right?
#right_content{
float: right;
margin-top: 20px;
width: 400px;
}
Sorry I should have mentioned that as well. I tried floating that content right and additionally tried floating it left and setting the position with the thinking that both divs would start out at left:0 where setting the margin of the right would move it over.
Thanks
A few things you should fix beforehand:
Your <style> tag is in <body>, when it belongs in <head>
You have a typo "realtive" in one of your inline styles:
<a href="http://feeds.feedburner.com/ryanlanciaux" style="position:realtive; top:-6px;">
Try to get your page to validate; this should make debugging the actual problems far easier.