How to make jquery-ui tabs no linebreak? - html

Recently, I use JQuery-UI tabs(http://jqueryui.com/tabs/) and get stuck when I try to use many tabs-nav li-s.
The excessive tabs-nav li-s go to the next line.
I want it to go in one line, with no linebreak, and scroll when it needs.
I serach for a lot of questions, and try many ways, but none solve mine.
Similar questions but not jquery-ui tabs are: Divs next to each other, with size, no linebreak
Wait for your valuable answers!
=============
Refer the html source codes here:Example
And the CSS are:
/* JQuery-UI tabs overwrites - set the width as small as possible! */
.ui-tabs { width:100px; }
.ui-tabs .ui-tabs-nav {}
.ui-tabs .ui-tabs-nav li {}

We did this on Compilr.com by hacking up the existing jquery-ui tabs plugin and the markup for it. I'm working on getting it cleaned up so we can open source it as a plug-in but for now you might just have to try and pick it apart using firebug or equivalent. I've been re-writing it from scratch and it's not quite done yet but I'll keep you posted.
Changing the markup and css around the tabs were really the key component to pulling this off.
EDIT:
I've started a very basic implementation using bootstrap. You can fork it on GitHub here: https://github.com/MarkMurphy/slidetabs

Related

Is there any other way to fix this problem besides using !importand after every line css

I'm currently working on an online code editor. (like jsfiddle codepen etc...)
I got everything working, but I ran into one problem; If a user does something like this:
button {
background-color: red;
}
It also changes the properties of my "run code" and "reset" button I made.
same thing with other things like a div;
div {
padding: 500em;
}
because this will also change the div's Im using in my own code.
I fixed the issue using !importand tags after every line in my css but I'm wordering if there is any other way to fix this? or is !importand really the only way.
As said in the comment by CBroe. To do this you can use iframe.
A more original solution would be to create a web component with a shadow root (which isolate the style too). The support for this is not too bad even if it's fairly new :
But, I've used it myself and it's a little bit harder to understand at first

How do you remove the previous and next buttons in mkdocs?

I am trying to remove the previous and next buttons in mkdocs but I don't want it to be hacky.
I have read the docs and searched the web and haven't found anything other than some GitHub issues.
Remove these buttons!
Thanks!
I would do this using CSS to hide it by adding into the included css. In the material theme it will be:
md-footer__inner { display: none }
This should be within the css which is included as extra_css in the mkdocs.yml.

Which css style has least effect on an element?

Today I was trying to create a dummy css rule for testing and investigation.
.dummy {
some-style : somevalue;
}
Ideally the class should have no visible effect. I want to be able to apply the class to elements but cause the least visible effect possible on any elements it is applied to. For example
<div class="dummy"> should look and behaves as much as possible like <div>
I did not want the class to be empty. Can anyone suggest a style that I could add to the class that would have the least visible impact when applied to a general html element? I can't think of anything completely harmless.
UPDATE: I wanted to add the style to some existing html. The reason was to use the style as a marker for diagnostic purposes. It would help me see when and where styles and stylesheets were getting loaded/cached and where and why some styles were getting overridden, sometimes by the browser defaults which seemed odd. At the time I didn't have exclusive use of the system I was working on so I wanted something that was going to be invisible to other users but I could see in Developer Tools.
UPDATE 2 : the html/css wasn't written by me and I didn't have my own environment in which to work. I was trying to investigate some problems in-situ in someone else's system. I had tried using DevTools in the browser but wasn't getting anywhere with that. I wanted to be able to make some small changes to their html/css to aid my diagnostics. I didn't want them to have any obvious effect on the system for other people (except in DevTools, viewed by me).
It was a Wordpress site and they only had two environments, one for live and one for testing. I was working with the test system. There were other people testing at the time, though mainly checking content.
The real thorny problem was why was the font-size in the calendar widget much larger than everything else on the site? Inspecting using DevTools I could see the font-size style was getting overridden by the browser default style when it seemed to me there were other css selectors that should have taken precedence. It looked bizarre. In the end it turned out to be a missing !DOCTYPE tag in the html. So nothing to do with the css itself.
I didn't like this way of working, fiddling in someone's system, but there wasn't much else to do and it did help to resolve the problem for them.
Hopefully I don't have to do this again, but ever since I have been wondering what was the most harmless style that I could have used?
I thought I would ask here as there must be people who know CSS better than me.
You can use this:
.dummy{
min-width: 0;
min-height: 0;
}
If you just need anything beeing set you could assign rules that are default anyway. For block elements like div set
.block-class { display: block; }
And for inline elements like span
.inline-class { display: inline; }
Of course it could be an issue doing so in some rare cases but in general it's quite harmless I guess.
In principle, for any property you can have an arrangement like this:
div {
some-style : a-valid-value-for-some-style;
}
.dummy {
some-style : a-different-valid-value-for-some-style;
}
And .dummy's style will have an effect, no matter what some-style is.
Your best bet is to make use of CSS variables. These are custom properties and start with a double hyphen. so
.dummy {
--dummy-style: foo;
}
will make --dummy-style a property with value "foo". So long as you don't employ the variable as the value in another property, it will have no visible effect.

Embed a short compact version of a Gist in HTML

Ok, so here for example let's say I want to embed a long gist such as doing:
<script src="https://gist.github.com/benanne/3274371.js"></script>
Link to gist: https://gist.github.com/benanne/3274371
However, the embedded Gist is too long in my webpage and I would like it to show as just a few lines that could be either scrolled or unwrapped by clicking, etc.
Is that possible? How?
Wrap the gist call in a container, style that and job done.
Edit just noticed the requirement to show/hide all, jQuery makes this trivial, you haven't mentioned jQuery or javascript in your question so I've come up with a hacky CSS/html option using target
.gistcontainer {
max-height: 300px;
overflow: auto;
}
.gistcontainer:target .show {display:none;}
.gistcontainer:target {max-height:none;}
<div class="gistcontainer" id="gist1">
More...
<script src="https://gist.github.com/benanne/3274371.js"></script>
</div>
This SO Question may also be of interest, particularly the fact the CSS classes used by gist seem to have changed over time, so a "wrapped" solution may be more future proof.

Joomla Annoying Footer

My Joomla site http://financial-freedom.com.au/ showing an annoying footer as
<a href='http://okjoomla.com' target='_blank'>Welcome to Get more sources</a>
I tried using dreamweaver's find tool but it didn't work. I also tried using search function in database which too didn't work.
Did anyone ever had this issue? I tried all the day Googling for this and found nothing. Any help is highly appreciated.
Edit: I manually check the footer module. And, found nothing there. As there are too many modules I can't check each module cause I believe search using Dreamweaver find too& search in PhpMyAdmin should search all modules content.
Thanks
As you commented, you do not have to search module in Dreamweaver or PHP MyAdmin, you will need administrator access like ... Or you will have to search in index.php as I told you, also I just opened that site, seems like you are downloading premium templates for free, so they do add backlinks, which are hard to figure out without source codes... So that's all I can help... Read ahead..
It may be a module, or the text must be literal string in your index.php page, if it's a module than disable it, else, go to the path below...
root/templates/system/index.php
In the above file, the text must be somewhere in the bottom, so just remove it
If you are not able to do that, than cheapest solution using CSS is display: none;, so as your a tag is adjacent to div having an id footerwrap so you can use
#footerwrap + a[href="http://okjoomla.com"] {
display: none;
}
OR
a[href="http://okjoomla.com"] {
display: none; /* This will remove all the anchor having that link */
}
Or you can use jQuery to remove it from the DOM completely
$('#footerwrap + a').remove();
Demo
Or to be more specific, and independent of the #footerwrap
$('a[href="http://okjoomla.com"]').remove();
/* This will remove all the anchor having that link so if you are
sure that it will be always adjacent than use #footerwrap + as well */
Demo