Joomla 3 NavBar - css

I am having a problem with displaying my navbar within my Joomla 3 website when resized to a tablet/mobile size.
For some reason I have a grey nav button appearing on the left and when i click this a blue nav bar appears on the right hand side with the menu then dropping down.
How can i make it so that I have either the grey or blue box and then when clicked the dropdown appears but all from one side.
I am confused as to why both are appearing.
When checking with firebug, I can see that one is navbar pull-left class and the other class is nav-collapse.

There are several variables to deal in this matter.
First, make sure version of bootstrap want to use and what you're really using.
Second, if you want to use the bootstrap version 3, make sure it is not charging well, version 2, which is the default Joomla brings. This will you manage in your template.
Third, you may also need an override of template for the code generated by joomla, run right.
I leave part of the code that you need for all this.
Get bootstrap 3 in joomla template. Copy js and css files to directorys and...
$doc->addScript($tpath.'/js/bootstrap.min.js');
$doc->addStyleSheet($tpath.'/css/bootstrap_3.css');
To avoid conflicts, how not to load js files it is as follows:
unset($doc->_scripts[$this->baseurl.'/media/jui/js/bootstrap.min.js']);
In this case, we remove the bootstrap.min.js joomla file loaded by default.

Related

Docusaurus make full page background gradient

I've just started to create a new project by using Docusaurus and have tried to change background of home page to linear gradient. However, couldn't make it. I can change the navbar and the footer colors seperately, but how to make the background of the page like shown in this picture?
In case of anyone wondering the result, I could solve the problem. By using the swizzling as stated in docusaurus documentation;
run npm run swizzle, and choose the Layout component in order to eject or wrap. The Layout folder will be visible to you under src/theme/ directory. You can edit the html,body style in styles.modules.css file to change the all background of the pages.

Find all used CSS Selectors on a page

At the beginning - I am sorry if title is not accurate. I just don't know how to call it properly.
Is there a way to find all paths related to some file, in my case it is bootstrap.min.css (it could be with unminified version) within a project? I mean, like on this screen:
So I want to find in DevTools (or may be in WebStorm, if it is simpler to do so) all Bootstrap paths that are related to all elements in project. At above screen i selected <nav> element with some Bootstrap classes, which I can see on the right. I emphased (red rectangle) Bootstrap CSS source file paths - already filtered by DevTools (orange rectangle). I could of course manually click on each link to exact line, but there are many HTML elements and some of them have multiple classes, there are few pages also. So it will take long time to click in all such links.
Is there a quick way to filter/find all such paths (that marked as red), which are used by Bootstrap CSS selectors to match all HTML elements in project?
Open DevTools
Overflow Menu > More Tools > Coverage
Click record in the toolbar of the drawer panel
Stop recording and view results
When viewing results you will be taken to the appropriate file in the Sources panel. This will then highlight each line in the gutter either red or green to indicate whether or not it was used. This works for CSS and JavaScript.

Enhanced image plugin not working correctly when custom styles have been applied

For my website we use custom style sheets that are stored locally on our server and are injected into the webpages. However when i add them to CKEditor and then attempt to resize or move an image with the enhanced image plugin they cannot be resized or moved at all. Has anyone encountered this problem before? Is there anyway around it?
edit: So i add my css files using
config.contentsCss = ['http://fonts.googleapis.com/css?family=Droid+Sans',
'http://fonts.googleapis.com/css?family=Bree+Serif',
'http://fonts.googleapis.com/css?family=Droid+Sans+Mono',
'http://192.168.0.50/css/new/all.css?v=1" media="all',
'http://192.168.0.50/css/new/templates.css?v=1',
'http://192.168.0.50/css/pre_review/colors.css?v=1',
'http://192.168.0.50/css/pre_review/paged_test.css?v=2',
'http://192.168.0.50/css/pre_review/bootstrap.min.css?v=1',
'http://192.168.0.50/css/pre_review/main.css?v=1',
'text/css'];
I have also installed the Enhanced Image plugin to allow me to resize and move images around. however when i insert an image on to the page the source looks like
<p><img alt="" height="239" src="http://icons.iconarchive.com/icons/yellowicon/game-stars/256/Mario-icon.png" width="239" /></p>
when i originally set the image width and height in the popup panel i set the values to 2 and 2, these values do nothing to edit the actual size of the image. It still displays at the full size of 239x 239.
I know that it is my added styles that are causing this error as it works fine without them, However i do need them. is there anyway around this without having to remove the styles?
First of all, your contentsCss has some weird parts like the last item or this 'http://192.168.0.50/css/new/all.css?v=1" media="all'. Please verify that all this works. Incorrect rules may affect CKEditor.
Second, the issue may be very simple - your CSS most likely affect widgets styling. Disable loading your CSS files one by one and see which one breaks the Enhanced Image plugin. Then find the rule that breaks it and then improve the rule so it does not affect images.

Bootstrap only mobile view (three lines)

I don't understand enough from Bootstrap.
How do I use Bootstrap to only show the mobile view (the three lines) at every resolution on my website?
The easiest way would be to go to http://getbootstrap.com/customize/#grid-system and change the value of #grid-float-breakpoint to #screen-lg or to a very large pixel value (ex. 9000px). Then download the updated bootstrap file with the "Compile and Download" button at the bottom of the page. Use the new files in your site files and the navbar will stay collapsed up until the browser is the width that you set.
You can't show the 3 lines at every resolution of your website. Bootrap only condenses the nav as the screen gets smaller. If you want to show the 3 lines you'll have to find the CSS for that in the bootstrap file and mimic it with new CSS conditions.

What is the best way to customize Bootstrap

I am now having a lot of troubles with Bootstrap. I used to use it to build a website once and then I have never used it again. But now, I have to use it. I downloaded the compressed version and include JS and CSS file in my project.
Here is the problem. I don't know how to customize it effective. For example, I create a navbar that is much higher (height:90px;) than the bootstrap default navbar. Hence, I have to modify the padding of the navigation panel on the navbar and when the navbar is collapsed, the items in this collapsible navbar are aligned incorrectly due to the padding and margin modification for the large screen.
I have one solution in my mind. May be I have to modify the media query padding and margin or if you have other effective ways to do it. Please tell me.
Create a file with overrides that you load after the bootstrap file. The override file will redefine the bootstrap classes you want to change. It's important that you load the override file after the bootstrap file.
Just linking Your own CSS file, and insert your custom class to the element. And then styling your custom class & avoid to override default class provided by bootstrap itself. This is my practice when using bootstrap or another CSS Framework.
Never have problem so far. Good luck for your project.

Resources