I am having some css issues...
When you hover over a product from here, you can see 'show now'..
But when you hover over the product from here, you can see 'Addto Cart' and you also see some black background for 'Add To Cart' which I am not understanding..
May I know what still I have to add in CSS..?
here is my code that displays products:
<!-- Product List -->
<div class="pl">
[product.each]
<div class="t1 col3">
<ul class="products ribbon">
<li class="product">
<a href="[product.link]">
<div class="thumbnail">
<img width="150" height="150" src="[product.image direct='1' tag='0']" class="attachment-shop_catalog wp-post-image" alt="[product.name]" title="[product.name]">
<div class="thumb-shadow"></div>
<strong class="below-thumb">[product.name]</strong>
</div>
<span class="price">
<span class="amount">
<?php if ($product->saleprice > 0 && $product->saleprice < $product->price) { ?>
<div class="prc">
<small>
<span style="text-decoration: line-through; color:blue;">[product.currency mode='sign'][product.price]</span>  
<span style="font-weight: bold; color:red;">[product.currency mode='sign'][product.saleprice]</span>
</small>
</div>
<?php } else { ?>
<div class="prc">
<small>
<span style="font-weight: bold; color:blue;">[product.currency mode='sign'][product.price]</span>
</small>
</div>
<?php } ?>
</span>
</span>
</a>
<div class="buttons" style="opacity: 0; visibility: visible; overflow: hidden; height: 41px; ">
SHOP NOW
</div>
</li>
</ul>
</div> <!-- t1 col3 #end -->
[/product.each]
<div class="clearingdiv"> </div>
</div>
<!-- /Product List -->
so, please tell me what am I missing..? you can find CSS code in source code...
They have used a background image.
In your case you need to set a background to .buttons or the anchor in there.
BTW: please stop using inline-stylsheets; use a separate <style> block or an external CSS file instead. That way, your CSS is much easier to read and understand.
Related
I'm trying to make button fixed using margin-bottom but it's not working if there is longer title.
My example: photo
<div class="post-detail-container-div">
<br />
<div class="post-content-div">
<h3 class="post-title entry-title">
<?php echo $p['naslov']; ?>
</h3>
<div class="spusti">
<ul class="list-unstyled list-inline post-metadata">
<li>
<i class="far fa-calendar"></i> Mon, 06-09-2018 |
</li>
<li>
<i class="far fa-comment"></i>
Comments(10)
</li>
</ul>
<p class="post-excerpt"> <?php echo $p['uvodni_tekst'];?> </p>
<hr>
<div class="view_detail">
Pročitaj više
</div>
</div>
If you check photo you can see that button's are not in same line because title is longer.
My CSS class view_detail:
.view_detail {
text-align: center;
margin-bottom: 30px;
}
I'm using bootstrap too, so every suggestion is welcome.
The simplest way:
add position: relative; to the main card container
add position: absolute; bottom: 0; to the button container
to avoid the overlap of the button set the margin-bottom of the text part as the height of the button container
Here is my messageboard project, I don't know why the different will influence my css layout...
I just test english,chinese,thai they both work great, but only japanese will destroy my css style..
I use en_US,ja_JP,zh_TW,th_TH php file to change language
When use English
When use japanese
<li class="board_list">
<div class="board_img">
<img class="board_icon" src="./static/icon/board_icon.svg" alt="board icon">
</div>
<div class="board_text">
<div class="board_title">
<span>
<a href="./board.php?board_id=1">
<span>This was just test the title length of board name</span>
</a>
</span>
</div>
<div class="board_info">
<p class="p1">投稿:26</p>
</div>
</div>
<div class="board_latest">
<div class="board_latest_title">
<span>最新の投稿 :</span>
This was just test the title length of board name
</div>
<div class="board_latest_info">
<a href="./member.php?user=1" title="carry0987">
<span>carry0987,</span>
</a>
<span>2018-04-28</span>
</div>
</div>
</li>
<li class="board_list">
<div class="board_img">
<img class="board_icon" src="./static/icon/board_icon.svg" alt="board icon">
</div>
<div class="board_text">
<div class="board_title">
<span>
<a href="./board.php?board_id=2">
<span>Default</span>
</a>
</span>
</div>
<div class="board_info">
<p class="p1">投稿:6</p>
</div>
</div>
<div class="board_latest">
<div class="board_latest_title">
<span>最新の投稿 :</span>
This was just test the title length of board name
</div>
<div class="board_latest_info">
<a href="./member.php?user=2" title="carry0987y">
<span>carry0987y,</span>
</a>
<span>2018-04-28</span>
</div>
</div>
</li>
And this is my css code
.board_list {
border-width: 1px;
border-style: solid;
border-color: #E9E9E9;
}
You should add new div inside .board_list this class and add css property clear:both;
Something like this :
Also read this article : https://www.w3schools.com/cssref/pr_class_clear.asp
I've made a list with <li> tags which looks like this.
https://gyazo.com/764cbe3542522bc552d774e1383ac810
Why is there a random <li> tag down there? There is nothing there to say at all?
<center>
<div class="site-wrapper-inner">
<div class="cover-container">
<div class="inner cover" style="text-align:left;margin-top:30px;">
<div class="card card-outline-primary">
<div class="card-header card-primary">
Database breaches
</div>
<div class="card-block">
<p>Here is a list of all databases that have been added to our search engine.</p>
<li>
<p>
<?php
$this->load->database();
$this->db->from('databases');
$query = $this->db->get();
foreach($query->result() as $q) {
?>
<?=$q->Website?> hacked on
<?=$q->Date?> with
<?=$q->Users?> users
<br />
<li>
<p>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
</center>
Here is a version of your exact code but I ran the "tidy" function in the snippet. See how it's broken?
You're not closing things properly, see the code comments. Also, you're incorrectly nesting the tags, the li is closed before the p even though it starts before it.
Technically, you're adding a new li element when you're trying to close the tag because instead of </li> you're doing <li>.
<center>
<div class="site-wrapper-inner">
<div class="cover-container">
<div class="inner cover" style="text-align:left;margin-top:30px;">
<div class="card card-outline-primary">
<div class="card-header card-primary">
Database breaches
</div>
<div class="card-block">
<p>Here is a list of all databases that have been added to our search engine.</p>
<li>
<p>
<?php $this->load->database(); $this->db->from('databases'); $query = $this->db->get(); foreach($query->result() as $q) { ?>
<?=$q->Website?> hacked on
<?=$q->Date?> with
<?=$q->Users?> users
<br />
<li> <!-- NOT A CLOSING TAG -->
<p> <!-- NOT A CLOSING TAG, ALSO SHOULD BE BEFORE THE CLOSING LI TAG -->
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</center>
I have dropdown with list of people results.
Each result contain some details.
The demand is that click in each <div class="list-item clearfix">will redirect the user to specific change ' unless the user click on some inner span ( <span class="locationJob">) which redirect him to another page.
<div class="list">
<g:each in="${peopleList?.getResults()}" var="doc">
<div class="list-item clearfix">
<g:link controller="connection" action="details" id="${ApplicationUtils.encodeString(doc.ref?.toString())}">
<div class="avatar">
<span class=""><img src="${doc.avatarUrl}" width="41" alt="Avatar" class="img-circle"/></span>
</div>
<div class="info">some text</div>
<div class="row no-margin body highlight-search-term">
<span class="locationJob">
<g:link controller="profile" action="show" id="${ApplicationUtils.encodeString(profExperienceCompanyIds[index]?.trim())}" class="professional-exp-highlight">
{currentCompany}</g:link>
</div>
</g:link>
</span>
</div>
</g:each>
</div>
I understood that it's not correct to write inside .... So what should I do?
You can replace inside g:link, use input type with onclick method to run remoteFunction:
http://grails.github.io/grails-doc/2.2.1/ref/Tags/remoteFunction.html
I'm having a problem with a page. Basically what happens is that the code below in firefox it doesn't display the images, in Chrome it shows the images, but sometimes it doesn't show anything.
The code below should display like an image of a product and below of it, show the name of the product, for example with this:
<div class="bloque_prod">
<a class="texto_bloque_prod" href="<? echo (ROOT.'/respiratoria"')?>"><img style="display: block !important; margin: auto;" src="mw\imagen\productos\categorias\respiratoria.gif" /></a>
<div class="texto_bloque_prod"><a class="texto_bloque_prod" href="<? echo (ROOT.'/respiratoria"')?>">Protección Respiratoria</a></div>
</div>
It should show the "respiratoria.gif" and below it show the text "Protección Respiratoria". And all the products in the code below show be display like in a table.
<div class="cont_menu_izq">
<!-- <a name="Safety" id="ramas" style="color:#D82C17;">Safety:</a> -->
<div class="mini_space"></div>
<!-- LINEA 1 -->
<div class="linea_prod">
<!-- Producto -->
<div class="bloque_prod">
<a class="texto_bloque_prod" href="http://www.elexsa.com/P/respiratoria""><img style="display: block !important; margin: auto;" src="mw\imagen\productos\categorias\respiratoria.gif" /></a>
<div class="texto_bloque_prod"><a class="texto_bloque_prod" href="http://www.elexsa.com/P/respiratoria"">Protección Respiratoria</a></div>
</div>
<!--Fin producto-->
<div class="espacio_bloque_prod"></div>
<!--Producto-->
<div class="bloque_prod">
<a class="texto_bloque_prod" href="http://www.elexsa.com/P/caidas""><img style="display: block; margin: auto;" src="mw\imagen\productos\categorias\caidas.gif" /></a>
<div class="texto_bloque_prod"><a class="texto_bloque_prod" href="http://www.elexsa.com/P/caidas"">Protección Contra Caídas</a></div>
</div>
<!--Fin producto-->
<div class="espacio_bloque_prod"></div>
<!--Producto-->
<div class="bloque_prod">
<a class="texto_bloque_prod" href="http://www.elexsa.com/P/guantes""><img style="display: block; margin: auto;" src="mw\imagen\productos\categorias\guantes.gif" /></a>
<div class="texto_bloque_prod"><a class="texto_bloque_prod" href="http://www.elexsa.com/P/guantes"">Protección para Manos</a></div>
</div>
<!--Fin producto-->
<div class="espacio_bloque_prod"></div>
<!--Producto-->
<div class="bloque_prod">
<a class="texto_bloque_prod" href="http://www.elexsa.com/P/visual""><img style="display: block; margin: auto;" src="mw\imagen\productos\categorias\visual.gif" /></a>
<div class="texto_bloque_prod"><a class="texto_bloque_prod" href="http://www.elexsa.com/P/visual"">Protección Visual</a></div>
</div>
<!--Fin producto-->
</div>
In addition to the other answers posted, I see doubled double quotes on some attributes:
href="http://www.elexsa.com/P/visual"">
http://validator.w3.org/
The W3C Validator service is your friend in cases like this.
Edit: after seeing your PHP code, the aforementioned error is caused by this line:
BAD
<a class="texto_bloque_prod" href="<? echo (ROOT.'/respiratoria"')?>">
GOOD
<a class="texto_bloque_prod" href="<? echo (ROOT.'/respiratoria')?>">
Your src attributes on your image tags have backslashes. They should be using forward slashes. Some browsers handle this for you and others don't.
You have your slashes backwards on your image src properties. Some browsers have tolerence for this, and others not. Either way, it's wrong. :)
src="mw\imagen\productos\categorias\visual.gif"
Should be
src="mw/imagen/productos/categorias/visual.gif"
...for all of your src paths.