z-index issue on iPad/iPhone - iphone

first of all I have very little experience with CSS/HTML, I'm not a webdesigner/coder, basically I have no clue what I'm doing.
I'm also close to kill myself because nothing helped. I really appreciate everyone who's trying to help me.
When you go on pawelpietryka.com and hover on the image it slides in a div via webkit transition and basically everything works.
I'm also using a webkit inset shadow which is animated too. I had big issues with this shadow because it always appeared behind the image (not in front) ... I hacked it with these changes
#demo-5 img { z-index: -1; position: relative; vertical-align: top; }
As soon as I put the z-index: -1; in it doesn't work on iPad/iPhone anymore, I'm tapping on the container and nothing happens.
(I'm assuming it doesn't have a hover state and when I'm trying to tap it it's somehow BEHIND the main layer.)
I've seen this on other page and the ideal scenario would be: 1) First tap box slides in 2) Second tap jump to destination.
Thanks!

If you think of your div nesting as a pyramid such as...
<pyramid>
<section level="1">
<section level="2">
</section>
</section>
</pyramid>
You can't get level 2 to appear under level 1, because level 1 contains level 2. If you would want level 2 to appear over level 2, usually they would be siblings, i.e
<pyramid>
<section level="1"></section>
<section level="2"></section>
</pyramid>
But in your specific case, I would recommend putting the image as the background of the div
<div id="boxes">
<?php while ( have_posts() ) : the_post(); ?>
<div class="box">
<a href="<?php the_permalink(); ?>">
<div class="rel" id="demo-5" style="background: transparent url(<?php the_post_thumbnail('homepage-thumb'); ?>) top left no-repeat">
<div class="detailsausgeblendet">
<h1><?php the_title(); ?></h1>
<?php the_excerpt() ?>
</div>
</div>
</a>
</div>
<?php endwhile; ?>
</div>

Trying to post it here, the formatting is odd on comments
<div id="boxes">
<?php while ( have_posts() ) : the_post(); ?>
<div class="box">
<a href="<?php the_permalink(); ?>"><div class="rel" id="demo-5" style="background-image:<?php the_post_thumbnail('homepage-thumb'); ?>">
<div class="detailsausgeblendet">
<h1><?php the_title(); ?></h1>
<?php the_excerpt() ?>
</div>
<?php endif ?>
</div></a>
</div>
<?php endwhile; ?>
</div>

And this is the code 'unchanged'
<div id="boxes">
<?php while ( have_posts() ) : the_post(); ?>
<div class="box">
<div class="rel" id="demo-5">
<?php the_post_thumbnail('homepage-thumb', array('alt' => '', 'title' => '')) ?>
<?php if ($imbalance2_theme_options['images_only'] == 0): ?>
<a href="<?php the_permalink(); ?>"><div class="detailsausgeblendet">
<h1><?php the_title(); ?></h1>
<?php the_excerpt() ?>
</div></a>
<?php endif ?>
</div>
</div>

Related

How to go to a div with a given ID cakephp3

I am struggling with this problem, I am writing a code for a dashboard but It's not coming together. This is the code currently have:
<?= $this->Html->link('Edit', array('#' => 'container edit', $server->id)) ?>
This is the link to the div right down here, it's working when i don't give the server-id to the specific row. With the ID it doesn't redirect correctly.
<div class="container admin-section admin-sub edit" id="admin-edit">
<nav class="col col-xs-12 col-md-4 columns" id="actions-sidebar">
<ul class="side-nav">
<li class="heading"><?= __('Actions') ?></li>
<li data-target="admin-overview">Server List</li>
<li><?= $this->Form->postLink(
__('Delete'),
['action' => 'delete', $servers->id],
['confirm' => __('Are you sure you want to delete # {0}?', $servers->id)]
)
?></li>
</ul>
</nav>
<div class="servers form col col-xs-12 col-md-8 columns content">
<?= $this->Form->create($servers) ?>
<fieldset>
<legend><?= __('Edit Server') ?></legend>
<?php
echo $this->Form->input('url', ['class'=> 'form-control']);
echo $this->Form->input('description', ['class'=> 'form-control']);
?>
</fieldset>
<?= $this->Form->button(__('Submit'), ['class'=> 'btn btn-primary']) ?>
<?= $this->Form->end() ?>
</div>
</div>
Instead it'll go to http://dashboard/pages/1#container%20add which it shouldn't be doing. How can I make sure it'll only go to the div and not a different page?
You can do this with Url->Build
exemple:
toto
You can do it by using controller and action name.
Example :
echo $this->Html->link('Title', array(
'controller'=>'pages',
'action'=>'index',
$server->id,
'container edit'
)
);
Above code will produce -
pages/{serverId}#container%20add
pages/index/{serverId}#container%20add

Fancybox The requested content cannot be loaded

I'm using fancybox plugin for my image gallery and having really interested trouble.
I have image gallery groups.
On my first group, if i click hover link for to open first image. i'm getting an error like "The requested content cannot be loaded.
Please try again later."
But it works fine in other image groups. For example please check http://www.naplesoft.com/hotels/likya-residence-and-spa-and-the-likya-retreat/?tab=rooms
Click view more info for Deluxe room, then click hover link "Click here to view more room images"
You will get an error.
But if you go other room types like "Deluxe room 106 or other ones" it works fine.
I don't know what did i wrong?
Here is PHP
<?php if (count($room['room_images']) > 0 ) { ?>
<p><a class="fancybox" rel="gallery<?php echo $counter; ?>" href="<?php echo $image['image']['sizes']['large']; ?>" title="<?php echo $image['caption']; ?>" >Click here</a> to view more room images</p>
<div class="image">
<?php // $isFirst = true;
foreach ($room['room_images'] as $image ) {
// if (!$isFirst) { ?>
<div class="foto"> <a class="fancybox" rel="gallery<?php echo $counter; ?>" href="<?php echo $image['image']['sizes']['large']; ?>" title="<?php echo $image['caption']; ?>" ><img style="width:150px; height:96px;" src="<?php echo $image['image']['sizes']['thumbnail']; ?>" alt="" /></a> </div>
Any helps?

Magento Checkout Comment

i'm still a beginner at Magento and try to learn how to create Modules. Right now i'm working on a module, which allows the customer to add a comment during the checkout.
Now i got a problem to implement the textarea, i created a new file called "practice" under app/design/frontend/base/default/layout and under app/design/frontend/base/default/template. I upload the new layout-file in the config.xml file of my module. But there isnt any textarea during the checkout, even though the right template is uploaded (i activated the template path hint option to see the path of each Block).
app/code/local/Practice/CheckoutComments/etc/config.xml
<frontend>
<layout>
<updates>
<checkoutcomments>
<file>practice/checkoutcomments.xml</file>
</checkoutcomments>
</updates>
</layout>
</frontend>
Here is the code of the layout.xml file and the phtml.file i override:
app/design/frontend/base/default/layout/practice/checkoutcomments.xml
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<checkout_onepage_review translate="label">
<reference name="checkout.onepage.agreements">
<action method="setTemplate">
<template>practice/checkoutcomments/onepage/comment-agreements.phtml
</template>
</action>
</reference>
</checkout_onepage_review>
</layout>
app/design/frontend/base/default/template/practice/checkoutcomments/onepage/comment-agreements.phtml
<?php
/**
*
* #see Mage_Checkout_Block_Agreements
*/
?>
<!-- Start of CheckoutComments module code -->
<form action="" id="checkout-agreements" onsubmit="return false;">
<ol class="checkout-agreements">
<div>
<br /> <label for="checkoutcomments"><?php echo Mage::helper('core')->__('Add your Comment for this Order') ?></label>
<textarea name="checkoutcomments" id="checkoutcomments"
style="width: 450px; height: 100px;"></textarea>
</div>
<!-- End of CheckoutComment module -->
<?php if ($this->getAgreements()) : ?>
<?php foreach ($this->getAgreements() as $_a): ?>
<li>
<div class="agreement-content"
<?php echo ($_a->getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>>
<?php if ($_a->getIsHtml()):?>
<?php echo $_a->getContent()?>
<?php else:?>
<?php echo nl2br($this->escapeHtml($_a->getContent()))?>
<?php endif; ?>
</div>
<p class="agree">
<input type="checkbox" id="agreement-<?php echo $_a->getId()?>"
name="agreement[<?php echo $_a->getId()?>]" value="1"
title="<?php echo $this->escapeHtml($_a->getCheckboxText()) ?>"
class="checkbox" /><label for="agreement-<?php echo $_a->getId()?>"><?php echo $_a->getIsHtml() ? $_a->getCheckboxText() : $this->escapeHtml($_a->getCheckboxText()) ?></label>
</p>
</li>
<?php endforeach ?>
<?php endif; ?>
</ol>
</form>
I deactivated my module and overrode the code of app/design/frontend/base/default/template/checkout/onepage/agreements.phtml with my customized pthml.file from above, then the textarea appears! I guess that something is wrong with my configurationsfiles, but i reference to the right block, since the block is uploaded but there isnt any textarea.
I hope you can help me
Regards
I solved the question by accident:
In
app/design/frontend/base/default/layout/practice/checkoutcomments.xml
i changed the line
<template>practice/checkoutcomments/onepage/comment-agreements.phtml
</template>
to:
<template>practice/checkoutcomments/onepage/comment-agreements.phtml</template>
it seems that i choose a wrong autoformat in eclipse, but i'm wondering, that this makes such a huge difference
Regards

bootstrap codeigniter form input and submit button

I am trying to go along with bootstrap and Codeigniter, but I am having a little problem, I cant seem to figure out how to align 3 simple elements into one row, so they are aligned perfectly next to each other.
I want my H3 tag, input field and my submit button from my form to be next to each other. I have already tried the span4 on the 3 objects within divs, then also display:inline, but nothing works correctly. I dont know why, but If I want them to be perfectly next to each other, I just have to put there margin-top: -7px and other margins on the other objects but this looks like a not a good approach on this matter at all. Could you please help me ? !
My code:
<div class="well">
<h3>My superb h3 tag!</h3>
<?php echo form_open('search/quick_search'); ?>
<?php echo form_error('search_query'); ?>
<?php echo form_input('search_query','','placeholder="Search query"'); ?>
<?php echo form_submit('submit_quick_search','Search','class="btn"'); ?>
<?php echo form_close(); ?>
How does it look
This is how I've been using then together (Horizontal form)
<?php echo form_open('search/quick_search', 'class="form-horizontal');?>
<div class="control-group <?php echo form_error('search_query')? 'error' : ''; ?>">
<label class="control-label" for="search_query">Search Term:</label>
<div class="controls">
<?php echo form_input('search_query','','placeholder="Search query"'); ?>
<span class="help-inline"><?php echo form_error('search_query'); ?></span>
<span class="help-block"></span>
</div>
</div>
<div class="form-actions">
<?php echo form_submit('submit_quick_search', 'Search', 'class="btn"'); ?>
</div>
<?php echo form_close(); ?>

Zend Layout Double Div

Hi i want to put two div in a zend view. After i want to have the two div in different position. My problem is that i want to have the normal content adn i want to add another div that rapresent the side menu
For example my view is:
<div id="view-menuscritte">
List menu
</div>
<div id="view-content">
<?php
echo $this->errorMessage;
echo $this->form;
?>
</div>
When I use in my layout
<div id="menu">
<img id="menusopra" src=<?php echo $this->baseUrl().'/img/menusopra.jpg'; ?> >
<div id="menuscrittegenerale">
<?php echo $this->layout()->menuscritte; ?>
</div>
<img id="menusotto" src=<?php echo $this->baseUrl().'/img/menusotto.jpg'; ?>
</div>
<div id="contentgenerale">
<?php echo $this->layout()->content; ?>
</div>
The problem is that the two div (->content and ->menuscritte) are in the same div.
view-menuscritte is not in menuscrittegenerale where it could be.
Inside folder of layout.phtml , create menu.phtml
cut and paste following content from your view into menu.phtml
<div id="view-menuscritte">
List menu
</div>
Now in your layout.phtml replace
<?php echo $this->layout()->menuscritte; ?>
with
<?php echo $this->partial('menu.phtml);?>