I downloaded fresh yiinitializr archive (from here) unpacked it. After I configured db etc. I wanted to print a icon, just like it's mentioned at the yiistrap site:
<?php echo TbHtml::icon(TbHtml::ICON_GLASS); ?>
And it's invisible. There is a proper HTML code:
<i class="icon-glass"></i>
The bootstrap.min.js and bootstrap.min.css are also attached. Why it's still invisible?
Have you included the icon image files. Bootstrap uses the glyphicons from http://glyphicons.com/ you need to include the icons image files.
Related
In Adobe Acrobat there is an option to add a "background" to a PDF file and set the default settings that this image should be visible when opening the document but should not be printed out. I want to automate the process by a PHP script.
I checked all the popular PHP PDF libs (TCPDF, FPDF, mPDF, ...) but none of them seems to provide such an option. All I found is adding images by the ->Image method and place it behind the text. This does work when viewing the document, but of course it is also printed out.
A second approach is to render plain HTML and include custom stylesheets. I created the simple HTML
<h1>Simple text.</h1>
<div>
<p>Should be printed.
<img src="..."></p>
</div>
<div class="no-print">
<p>Should NOT be printed.
<img src="..."></p>
</div>
and saved the CSS in print.css
.no-print {
display: none;
}
and included it by:
<link rel="stylesheet" media=“print” type="text/css" href="print.css">
The result does not show the second div. I guess the PDF libs do not evaluate the media in the link tag. To be honest this approach does not feel right, especially because PDF !== HTML.
Nevertheless I cannot imagine that this is so difficult. How do all the big companies manage this? I'm grateful for every hint!
I have started learning html and php. I know very little coding of it. I am confused for using png icons in my action buttons. I have currently text button with css. I want use png icons instead that text buttons. I have used it like below
<td>
Edit
Activate
Delete
</td>
Now I want use png icons there instead of text. What should I do for it ?
I have icons located in directory called icons.
Sorry for my little knowledge.
Thanks
You can add icon as image in your code, check below snippet
<td><img src="https://dummyimage.com/20x20/000/fff.png&text=E" alt="Edit"/>
<img src="https://dummyimage.com/20x20/000/fff.png&text=A" alt="Activate"/>
<img src="https://dummyimage.com/20x20/000/fff.png&text=D" alt="Delete"/></td>
It depends on the structure of your web folder, where icons directory is in your web folder.
If you have icon directory in your root folder and php file is also in root then you can simply use below syntax :
<img src="icon/image_name.jpg" alt="" />
Or you can use complete path for icon folder relative to your website url as shown below :
<img src="http://localhost:8080/websitename/icon/image_name.jpg" alt="" />
I am trying to edit the header of my website to use my logo in the header. In the header.php file under the "Display Logo Image or Site Title" code here is what I have after putting in the image link:
$options = get_option('zeefocus_options');
if ( isset($options['themeZee_general_logo']) and $options['themeZee_general_logo'] <> "" ) : ?>
<img class="logo-image" src="http://i.imgur.com/02WuoWa.png" alt="Auto-Platre" /></a>
I saved and uploaded the file, but the webpage is still the same. Do I need to edit anything in the Wordpress admin?
Without more info this question is kind of hard to answer but here are a few things to try:
Clear your cache if you have it enabled
Your theme might have a built in header option, in which case you can upload the image to directly through the theme settings
Inside a CMS block in Magento 1.7.0.2 I am trying to get a background image
the code that I use in the HTML EDITOR for the block is this:
<div class="imageclass" style="background: url()">
</div>
Inside the url() I should place the exact url of my image.
But the problem is that if I load from WYSIWYG folder in CMS I DON'T get a correct path
So what kind of path should I put into the url below ?
<div class="imageclass" style="background: url()">
</div>
My background image is on
/media/wysiwyg/images_cms/mybackground.png
You put in a relative or absolute URL. Also, you should put it in a class, not inline.
.imageclass {
background: url(/media/wysiwyg/images_cms/mybackground.png);
}
See the MDN docs for background-image
I needed to overcome a similar issue, however I needed them to be CMS editable for each page thus my backgorund could not be set in the stylesheet.
This is the method i used to get the media path:
<div style="background-image:url('<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) ?>mybackground.png')"></div>
I am new to Drupal.I am using marinelli theam.I created one block and placed in footer section with some text.In Drupal 7 how to add an image in a block located in footer section..I tried using Full HTML and filtered HTML Text format.It was not added image.
Make sure the path to the image is correct.
1- Enable "PHP Filter" module, in Drupal Core modules.
2- inside the block content, make sure that the text format is "PHP code" and then type the following code:
global $base_path;
print "<img alth='' src='" . $base_path . "PATH_TO_IMAGE/image.jpg' />";
Hope this works... Muhammad.
You can directly use a wysiwyg editor and use insert picture any where you want. I prefer CKEditor.
What you can do is go to edit mode of your block. Then add image link using the following formatt:
<img src="../sites/all/themes/marinelli /images/[your imagename and extension]">
If you haven't got through, I hope this helps.