I want to take topSearch from the header and copy it to a content page, so I cut from header.phtml and added to 3columns.phtml:
<?php echo $this->getChildHtml('topSearch'); ?>
It doesn't work, though. Any ideas?
I found solution for change the search bar position header to top links.
go to:-
app/design/frontend/[your_theme]/default/layout/catalogsearch.xml
replace this code
reference name="header"
with this
reference name="top.menu"
Changes css according to your design.
it woks for me
.form-search
margin-left: 899px;
margin-top: 8px;
position: absolute;
add the above css
let the search box on the header itself
just using the absolute property you can play to display its position
contact me on my email for furthur help.
Thanks.
Suraj Mishra
Magento Extension Developer
msooraz#gmail.com
Related
I use Prestashop 1.7.5.1.
I want the description block and product details on the product page to be on the right side of the page and also fill the entire width of the page. How can I do this? What changes should be made to the product.tpl file or to the corresponding CSS file.
It is difficult to assist you because you did not post a fiddle with your HTML/CSS code, please try to edit/update your question.
However, I'm assuming you are using the default template coming with PrestaShop 1.7.x so you should have two columns with the class "col-md-6" inside your product.tpl file.
Simply put style="float:left;" on the one containing the product picture and style="float:right;" on the other.
Regarding the width of these columns, there are currently constrained by the element:
#media (min-width: 1200px)
.container {
width: 1140px;
max-width: 100%;
}
You can for the width to 100% with width: 100%; instead, I wouldn't recommend doing this though.
Final result:
I want to set icon in sidebar of joomla component backend
JHtmlSidebar::addEntry(JText::_('USERS'),'index.php?option=com_users&view=users',$vName == 'users') is used to create this sidebar
My initial answer was for the menu, see below.
For the sidebar, the easiest answer is probably just adding custom css to the admin-theme. By default there are no classes on the sidebar menu items, but you can use the href-tag with attribute-selectors in css, like this:
/* For each item in the sidebar: */
a[href*="yourview"]{
display: block;
padding: 0 0 0 20px;
background: transparent url(link/to/img.png) 0 0 no-repeat;
}
It is also possible to override the sidebar output by copying the file /layouts/joomla/sidebars/submenu.php to the folder html/layouts/joomla/sidebars/submenu.php, and edit this file to display like you want it. More info is found here.
For the menu: It seems like you can add this to the definition of the administration menu in /administrator/components/com_componentname/componentname.xml, like this:
<administration>
<menu img="link/to/icon.png" >COM_COMPONENTNAME</menu>
<submenu>
<menu link="option=com_componentname&view=aview" view="aview"
img="link/to/other-icon.png" alt="Componentname/Aview">
COM_COMPONENTNAME_TITLE_AVIEW
</menu>
</submenu>
</administration>
If you actually want to hide the texts (not sure if I understood you right), you'll need to add some css to the backend theme, or to your component, to accomplish this. If you need to modify the backup theme, it's probably best to make a copy of the isis-theme, so your changes are not overwritten by joomla updates.
Finally I got Answer of this question
Answer
JHtmlSidebar::addEntry('<span class="dashboard-submenuicon"></span>'.
JText::_('Dashboard'),
'index.php?option=com_mycomponent&view=dashboard',
$vName == 'dashboard'
);
We can write css code like
.dashboard-submenuicon{
background-image:url('your_image_url');
background-repeat: no-repeat;
display: inline-block;
height: 22px;
vertical-align: middle;
width: 22px;
margin-right:5px;
}
You need to be sure to include the CSS for the icon you want to add. If you inspect your links there should be an associated class. Create your component CSS to include the background-image you want to use.
The answer related to the admin menu is for Joomla 2.5 and is related to admin main top menu items, not sidebar items.
I need to place a block of HTML above the Megamenu. This block of HTML occupies the whole horizontal space above the Megamenu. I am using Joomla! 3.4.0 and the Purity_III template.
Anyone here can please tell how this can be done?
I have tried to modify the file:
public_html/site/templates/purity_iii/tpls/blocks/header.php
I added the following code after the code <div class='container'>:
<div style='margin-bottom: 10px; font-family: arial; color: #FFFFFF; font-size: 20px;'>
THINGS I WANT TO WRITE
</div>
Indeed, this writes above the megamenu, but then the megamenu starts appearing hover the text of the site.
Yes, I know I have to write CSS code. The question is I don't know what to write!
The file header.php is a custom file for the purity template. I didn't write it myself.
I am trying to add an image in the header of my jQuery Mobile based web page.
I want the image to be aligned to the right edge and using CSS for this purpose. But the results are not satisfactory.
(Problem*)There is a big gap between the image and the edge and it is also not aligned with the header text.
Here is the header code:
<header data-role='header'><h1>My App<img src="my_logo.png" alt="Low resolution logo"class="align-right"/></h1></header>
and here is the CSS code for class align-right:
.align-right{
float:right;
margin-right: 5px;
}
No need to add custom styling or such. Jquery-Mobile already has built-in solutions for this. Just add the class 'ui-btn-left' or 'ui-btn-right' to your image (as if it were a button) and you're all set.
<header data-role="header">
<h1>My App</h1>
<img src="my_logo.png" class="ui-btn-right" />
</header>
I know the question has been asked way before, but I figured this might help those who are still looking for solutions. Besides, the question wasn't set as answered.
Based on your code example, you need a space between the alt attribute and the class attribute.
You have:
alt="Low resolution logo"class="align-right"
Should be:
alt="Low resolution logo" class="align-right"
Also, it is probably better to not have the <img /> tag inside of your <h1> element.
Check out the docs for more information on custom headers: http://jquerymobile.com/test/docs/toolbars/docs-headers.html
Something like this should work:
<head>
<style>
body{ margin: 0; }
.align-right{ float:right; margin-right: 0px;}
</style>
</head>
<body>
<div data-role='header'><h1>My App<img src="my_logo.png" alt="Low resolution logo"class="align-right"/></h1></div>
</body>
In my case, I was using a link as a button in my Header, and I wanted the same results where the image would show in the top right corner. I also wanted additional attributes added to the image such as no text, no corners, no disc, etc. Using ui-btn-right alone broke those other attributes. The fix was to include both ui-btn and ui-btn-right to the class, as shown below:
Options
I have problem with tooltips on my magento website, I need to have one tooltip on product page which will show a HTML UL List. I tried some plugins I found but had problems with JQuery as it was disabling other prototype pop up I have on product page.
Im really a newbie at All the types of javascript and hope you experts can help me with this please.
My trigger id for tooltips is #why-to-buy
and the tooltip class in CSS is .why-to-buy-tooltip
can anyone suggest me a prototype or scriptaculous driven simple tooltip which can show HTML please?
Any help is more than welcome.
Thanks in advance.
Typically this can be done in just CSS. To start with there needs to be an anchor;
<a id="why-to-buy" href="#" onclick="return false;">
Why To Buy?
<ul class="why-to-buy-tooltip">
<li>Reason #1</li>
<li>Reason #2</li>
</ul>
</a>
The onclick is to prevent it working as a hyperlink. An anchor is necessary for older IEs to respect the following hover;
#why-to-buy {
position: relative;
}
#why-to-buy .why-to-buy-tooltip {
display: none;
position: absolute;
width: 200px;
height: 200px;
z-index: 100;
}
#why-to-buy:hover .why-to-buy-tooltip, #why-to-buy:active .why-to-buy-tooltip {
display: block;
}
If you need more info search for and read about "CSS popups". A nice touch is to add some CSS3 transitions - old browsers just ignore them and continue to work as normal.
This type of popup is limited because it is inside an anchor, and anchors cannot contain anchors. If the #why-to-buy element is of another type, such as a DIV, then IE doesn't pick up the :hover pseudoclass. For this special case a bit of JavaScript is needed after all.
$('why-to-buy').observe('mouseenter', function() {
this.addClassName('over');
}).observe('mouseleave', function() {
this.removeClassName('over');
});
Update the last stylesheet rule to include #why-to-buy.over .why-to-buy-tooltip. The bit of JavaScript is rarely needed and can go in /skin/frontend/base/default/js/ie6.js. Or you could encourage browser upgrades and choose not to support old IE at all.
A quick Google searched returned this one, and shows to support HTML:
http://www.nickstakenburg.com/projects/prototip/
It's prototype based so should work well with Magento.