I have two small divs at the two left and right corners of my page. There is a lot of space between them. I want to occupy all that space with another div.
Here is the CSS code:
.signatureBox{
border-radius: 5px;
border-width: 1px;
border-style: solid;
border-color: rgb(128, 128, 128);
min-width: 200px;
min-height: 65px;
padding: 3px;
display: block;'
}
and the HTML code:
<div class='signatureContainer'>
<span class='signatureBox' style='float: left;' >
<span>employee</span>
<hr style='margin-top: 70px;' />
<span>Role</span>
</span>
<span class='signatureBox' style='float: left'>
<span>employee</span>
<hr style='margin-top: 70px;' />
<span>Role</span>
</span>
<span class='signatureBox' style='float: right'>
<span> </span>
<hr style='margin-top: 70px;' />
<span> Master </span>
</span>
</div>
If you are trying to remove the space between them, you should simply set float to left on every one of them.
<div class='signatureContainer'>
<span class='signatureBox' style='float: left;' >
<span>employee</span>
<hr style='margin-top: 70px;' />
<span>Role</span>
</span>
<span class='signatureBox' style='float: left'>
<span>employee</span>
<hr style='margin-top: 70px;' />
<span>Role</span>
</span>
<span class='signatureBox' style='float: left'>
<span> </span>
<hr style='margin-top: 70px;' />
<span> Master </span>
</span>
Related
I need put letters in a permanent site in a div like the next photo
as you can see I need to reduce the position of the letters
My code is this
<div class="col-md-4 col-xl-4 col-xs-4 col-sm-4 col-lg-4">
<div class="contenedor">
<center>
<h3>Helado de copoazú </h3>
</center>
<br />
<figure>
<img src="/as_website_sale_onepage/static/img/helado_copoazu.jpeg"
style="width: 100%;border-radius: 8px;" product_id='45' onmousemove="deshabilitar()"/>
<div class="centrado2" name="disponible_helado" id="agotado_45"></div>
</figure>
<center>
<div id="adiciona45_mostrar" style="font-weight:bold; font-size: 22px;">
Bs.
10
</div>
<button id="stepDown-helado" type="button" style="border-radius: 15px;"
class=" btn btn-success"
onclick="cambiar_inputs();" product_id='45'>-</button>
<input type="number" name="numero_helado" id="numero_helado" value="0"
min="0" readonly="1" size="3"
style="text-align: center;width:50px !important; border: 1px solid #97CCF3; color: #099EFB; font-weight: bold;border-radius: 15px;" />
<button id="stepUp-helado" type="button" style="border-radius: 15px;"
class=" btn btn-primary"
onclick="cambiar_inputs();" product_id='45'>+</button>
</center>
</div>
<hr style="border: 5px solid #1db33b; width:100%" />
</div>
How can i do that?
using css this is simple
div::after{
content: 'anyLetter';
}
or
div::before{
content: 'anyLetter';
}
Edit: if you want to add it in the around the location marked in the image,
i would suggest around the <h3> or the <figure> tags.
also adding a class like after-word would make it more usable
Trying to get a class to remain sticky and constantly be in view when the user scrolls down the page, but doesn't seem to work no matter what.
I tired:
.entry-summary{
position: -webkit-sticky; /* Safari */
position: sticky;
top: 0;}
But this does nothing.
The full code can be seen below and is part of this webpage https://aqwaa.net/product/constriction/:
<div class="qode-single-product-summary">
<div class="summary entry-summary">
<div class="clearfix">
<h1 class="product_title entry-title">Constriction</h1><p class="price"><span class="woocs_price_code" data-product-id="459"><span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">€</span>173.39</span></span></p>
<div class="woocommerce-product-details__short-description">
<p><strong>Mental Health Description: </strong>So often a symptom of anxiety is the feeling of a tightness or tension in the rib cage area. Anxiety has the ability to kick start your bodies fight or flight response, which can increase your stress which often leads to your bodies muscles to contract and tighten, hence, the ribcage tightness symptom. This piece is designed to bring awareness to how it feels inside for someone who is suffering with mental health problems.</p>
</div>
<form class="cart" action="https://aqwaa.net/product/constriction/" method="post" enctype="multipart/form-data">
<div class="quantity buttons_added">
<input type="button" value="-" class="minus">
<input type="text" id="quantity_5cba756e35068" step="1" min="1" max="" name="quantity" value="1" title="Qty" class="input-text qty text" size="4" pattern="[0-9]*" inputmode="numeric" aria-labelledby="Constriction quantity">
<input type="button" value="+" class="plus">
</div>
<button type="submit" name="add-to-cart" value="459" class="single_add_to_cart_button button alt single_add_to_cart_button qbutton button alt">Add to cart</button>
</form>
<div class="product_meta">
<span class="sku_wrapper">SKU: <span class="sku">AQ1007</span></span>
<span class="posted_in">Category: AQWAA</span>
<span class="tagged_as">Tag: Necklace</span>
</div>
<div class="q_accordion_holder toggle boxed woocommerce-accordion accordion ui-accordion ui-accordion-icons ui-widget ui-helper-reset" style="visibility: visible;">
<h6 class="title-holder clearfix description_tab ui-accordion-header ui-helper-reset ui-state-default ui-corner-top ui-corner-bottom">
<span class="tab-title">Description</span>
</h6>
<div class="accordion_content ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" style="display: none;">
<div class="accordion_content_inner">
<p><strong>Material Description:</strong> Produced in Dubai, UAE, the “Constriction” necklace is is .925 Sterling Silver finished in 18k Gold.</p>
<p><strong>Size:</strong> The pendant is 26.5 mm width – 27.3 mm height on a chain of X cm length.</p>
<style>.woocommerce-product-gallery__image{width: 100% !important;}</style>
</div>
</div>
<h6 class="title-holder clearfix additional_information_tab ui-accordion-header ui-helper-reset ui-state-default ui-corner-top ui-corner-bottom">
<span class="tab-title">Additional Information</span>
</h6>
<div class="accordion_content ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" style="display: none;">
<div class="accordion_content_inner">
<table class="woocommerce-product-attributes shop_attributes">
<tbody><tr class="woocommerce-product-attributes-item woocommerce-product-attributes-item--dimensions">
<th class="woocommerce-product-attributes-item__label">Dimensions</th>
<td class="woocommerce-product-attributes-item__value">26.5 × 27.3 mm</td>
</tr>
<tr class="woocommerce-product-attributes-item woocommerce-product-attributes-item--attribute_pa_gold">
<th class="woocommerce-product-attributes-item__label">Gold</th>
<td class="woocommerce-product-attributes-item__value"><p>18k Gold</p>
</td>
</tr>
<tr class="woocommerce-product-attributes-item woocommerce-product-attributes-item--attribute_pa_silver">
<th class="woocommerce-product-attributes-item__label">Silver</th>
<td class="woocommerce-product-attributes-item__value"><p>.925 Sterling Silver</p>
</td>
</tr>
</tbody></table>
</div>
</div>
</div>
</div><!-- .clearfix -->
</div><!-- .summary -->
</div>
I expect the class .summary.entry-summary to remain visible as the user scrolls down the page, this does not happen.
Based on your code snippet, it looks as though the .entry-summary class belongs to one div, which is a single child element in a container.
The position:sticky can only allow the child to 'float' over sibling elements within the same container.
I copied your code into codepen, and added another blank <div> in your <div class="qode-single-product-summary"> to take up some vertical space and provide a sibling element, and it appears to be working just fine.
(Look for my comments "I added this" towards the bottom of your code)
Also if you run the snippet I provided, you should see the sticky property working until approximately half way down when the dummy div I added ends...
.entry-summary {
position: -webkit-sticky;
/* Safari */
position: sticky;
top: 0;
}
/* i added this */
#spacefill {
height: 10000px;
}
<div class="qode-single-product-summary">
<div class="summary entry-summary">
<div class="clearfix">
<h1 class="product_title entry-title">Constriction</h1>
<p class="price"><span class="woocs_price_code" data-product-id="459"><span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">€</span>173.39</span>
</span>
</p>
<div class="woocommerce-product-details__short-description">
<p><strong>Mental Health Description: </strong>So often a symptom of anxiety is the feeling of a tightness or tension in the rib cage area. Anxiety has the ability to kick start your bodies fight or flight response, which can increase your stress
which often leads to your bodies muscles to contract and tighten, hence, the ribcage tightness symptom. This piece is designed to bring awareness to how it feels inside for someone who is suffering with mental health problems.</p>
</div>
<form class="cart" action="https://aqwaa.net/product/constriction/" method="post" enctype="multipart/form-data">
<div class="quantity buttons_added">
<input type="button" value="-" class="minus">
<input type="text" id="quantity_5cba756e35068" step="1" min="1" max="" name="quantity" value="1" title="Qty" class="input-text qty text" size="4" pattern="[0-9]*" inputmode="numeric" aria-labelledby="Constriction quantity">
<input type="button" value="+" class="plus">
</div>
<button type="submit" name="add-to-cart" value="459" class="single_add_to_cart_button button alt single_add_to_cart_button qbutton button alt">Add to cart</button>
</form>
<div class="product_meta">
<span class="sku_wrapper">SKU: <span class="sku">AQ1007</span></span>
<span class="posted_in">Category: AQWAA</span>
<span class="tagged_as">Tag: Necklace</span>
</div>
<div class="q_accordion_holder toggle boxed woocommerce-accordion accordion ui-accordion ui-accordion-icons ui-widget ui-helper-reset" style="visibility: visible;">
<h6 class="title-holder clearfix description_tab ui-accordion-header ui-helper-reset ui-state-default ui-corner-top ui-corner-bottom">
<span class="tab-title">Description</span>
</h6>
<div class="accordion_content ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" style="display: none;">
<div class="accordion_content_inner">
<p><strong>Material Description:</strong> Produced in Dubai, UAE, the “Constriction” necklace is is .925 Sterling Silver finished in 18k Gold.</p>
<p><strong>Size:</strong> The pendant is 26.5 mm width – 27.3 mm height on a chain of X cm length.</p>
<style>
.woocommerce-product-gallery__image {
width: 100% !important;
}
</style>
</div>
</div>
<h6 class="title-holder clearfix additional_information_tab ui-accordion-header ui-helper-reset ui-state-default ui-corner-top ui-corner-bottom">
<span class="tab-title">Additional Information</span>
</h6>
<div class="accordion_content ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" style="display: none;">
<div class="accordion_content_inner">
<table class="woocommerce-product-attributes shop_attributes">
<tbody>
<tr class="woocommerce-product-attributes-item woocommerce-product-attributes-item--dimensions">
<th class="woocommerce-product-attributes-item__label">Dimensions</th>
<td class="woocommerce-product-attributes-item__value">26.5 × 27.3 mm</td>
</tr>
<tr class="woocommerce-product-attributes-item woocommerce-product-attributes-item--attribute_pa_gold">
<th class="woocommerce-product-attributes-item__label">Gold</th>
<td class="woocommerce-product-attributes-item__value">
<p>18k Gold</p>
</td>
</tr>
<tr class="woocommerce-product-attributes-item woocommerce-product-attributes-item--attribute_pa_silver">
<th class="woocommerce-product-attributes-item__label">Silver</th>
<td class="woocommerce-product-attributes-item__value">
<p>.925 Sterling Silver</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="spacefill">
</div>
</div>
<!-- .clearfix -->
</div>
<!-- .summary -->
<div id="spacefill">
<!-- I added this -->
</div>
</div>
Here's the solution that worked best for me. You can see the final result on the webpage. Involves using position:fixed and some nifty z-index cheats.
.woocommerce-product-gallery__image{width: 100% !important;}
#media all and (min-width:1000px) {
.qode-single-product-summary {
position: fixed;
z-index: 110;
right: 113px;
width: 40%;
}
.woocommerce .summary {
float: right;
width: 100%;
margin-bottom: 45px;
}
.woocommerce ul.products {
background: #fff;
z-index: 999999999999999999999;
position: relative;
display: table;
}
.qode-single-product-summary {
position: fixed;
z-index: 110;
right: 113px;
width: 40%;
}
.woocommerce .summary {
float: right;
width: 100%;
margin-bottom: 45px;
}
.woocommerce ul.products {
background: #fff;
z-index: 999999999999999999999;
position: relative;
display: table;
margin: 0 0 0px;
}
.content_bottom {
padding-top: 80px;
background: #fff;
}
.woocommerce-page .content .container .container_inner {
padding-bottom: 0!important;
}
h2.qode-related-upsells-title {
z-index: 99999999999;
background: #fff;
padding-top: 0!important;
display: table;
position: relative;
width: 100%;
margin-bottom: 0!important;
padding-bottom: 34px;
}
}
#media all and (min-width:1500px) {
.qode-single-product-summary {
width: 1300px; right:initial;
}
.woocommerce .summary {
width: 500px;
}
}
I have the below html code,i want to add a subtext(select Dates) for MyCalendar label.
<tr style="height:5%;">
<td colspan="2">
<span style="float:right;"> <label style="float: right">MyCalendar<input id="t1" class="sid myClassValue" style="float: right" ng-model="myData"></label> </span>
<span style="float:left;"> <a style="text-align: right; float: right; color: #c94e00" target="_blank" href="http://myURL.com">Click on link</a> </span>
</td>
</tr>
I tried as below but the alignment is not as expected:
<tr style="height:5%;">
<td colspan="2">
<span style="float:right;"> <label style="float: right;display:block;">MyCalendar: <br /><span> <font size="1">(select Dates) <font size="1"></span><input id="t1" class="sid myClassValue" style="float: right" ng-model="myData"></label>
</span>
<span style="float:left;"> <a style="text-align: right; float: right; color: #c94e00" target="_blank" href="http://myURL.com">Click on link</a> </span>
</td>
</tr>
You may try using :after element like this so you don't have to touch your HTML structure :
span.more label {
position: relative;
}
span.more label:after {
content: "(Select dates)";
position: absolute;
bottom: -10px;
left: 10px;
font-size: 11px;
}
<tr style="height:5%;">
<td colspan="2">
<span class="more" style="float:right;"> <label style="float: right">MyCalendar<input id="t1" class="sid myClassValue" style="float: right" ng-model="myData"></label> </span>
<span style="float:left;"> <a style="text-align: right; float: right; color: #c94e00" target="_blank" href="http://myURL.com">Click on link</a> </span>
</td>
</tr>
I have display inline-block etc. but the htmlDiv div in this mark-up does not behave as I expected. It behaves as if the inner divs are beside each other even when they are not. How to fix this?
Please run the animated snippet if it's not clear...
var demoContainer = d3.select('#demoContainer').style('width', '100px')
function tick() {
demoContainer.transition().duration(4000).style('width', '400px')
.transition().duration(4000).style('width', '600px')
.transition().duration(3000).style('width', '400px')
.transition().duration(3000).style('width', '100px')
.each('end', tick);
};
tick();
#htmlDiv {
font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif;
font-size: 12px;
outline: solid 1px black;
background-color: rgba(0, 0, 0, 0.25);
display: inline-block;
position: relative;
}
.container {
height: auto;
width: 100%;
display: inline-block;
position: relative;
}
.bubbles,
.subBubbles,
.span {
color: #ccc;
}
.select-bubbles,
.bubbles {
padding: 5px;
margin: 3px;
outline: solid 1px white;
background-color: rgb(114, 114, 114);
width: 150px;
display: inline-block;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"></script>
<div id="demoContainer" style="outline: solid 3px red; padding: 10px">
<div id="htmlDiv">
I want this outer div to shrink-wrap the 4 inner divs regardless of width... <br>
<div class="container">
<div class="select-bubbles">
<select class="selector">
<option value="select">select</option>
<option value="selectAll">selectAll</option>
</select>
<select id="multi-single">
<option value="4">multi</option>
<option value="1">single</option>
</select>
<div class="select-subBubbles">
<select class="selector">
<option value="select">select</option>
<option value="selectAll" selected="selected">selectAll</option>
</select>
<span class="select-spans">
<select class="selector">
<option value="select">select</option>
<option value="selectAll">selectAll</option>
</select>
</span>
</div>
</div>
</div> <br>
<div class="bubbles bubble1">
bubble1
<div class="subBubbles bubble1">
<span>sub1</span>
<span class="spans bubble1">
<span style="transform: rotateX(0deg); color: rgb(0, 0, 0);" class="temp">
sub1
</span> subsub1
</span>
<span class="spans bubble2">subsub2</span>
</div>
<div class="subBubbles bubble2">
<span>
sub2
</span>
<span class="spans bubble1">
<span class="temp">
sub2
</span>
subsub1
</span>
</div>
</div>
<div class="bubbles bubble2">
bubble2
<div class="subBubbles bubble1">
sub1
<span class="spans bubble1">subsub1</span>
<span class="spans bubble2">subsub2</span>
</div>
<div class="subBubbles bubble2">
sub2
<span class="spans bubble1">subsub1</span>
<span class="spans bubble2">subsub2</span>
</div><div class="subBubbles bubble3">
sub3
<span class="spans bubble1">
subsub1
</span>
<span class="spans bubble2">
subsub2
</span>
</div>
</div>
<div class="bubbles bubble2">
bubble2
<div class="subBubbles bubble1">
sub1
<span class="spans bubble1">subsub1</span>
<span class="spans bubble2">subsub2</span>
</div>
<div class="subBubbles bubble2">
sub2
<span class="spans bubble1">subsub1</span>
<span class="spans bubble2">subsub2</span>
</div><div class="subBubbles bubble3">
sub3
<span class="spans bubble1">
subsub1
</span>
<span class="spans bubble2">
subsub2
</span>
</div>
</div>
</div>
</div>
The Problem with your were you were setting width for 250px in the below code
.select-bubbles, .bubbles {
padding: 5px;
margin: 3px;
outline: solid 1px white;
background-color: rgb(114, 114, 114);
/* width: 250px; */
/* display: inline-block; */
}
Remove the inline-block and setting your width to 250px which causes your box not to shrink less than 250px.
We are removing the inline-block for the time being if u want u can add it with some more properties to make it look good.
Your question is unclear but I think you want to do the following:
.container,
.select-bubbles,
.bubbles {
display: block;
}
Instead of inline-block.
I am having trouble visualizing my CSS and I am trying to reach all td's first span with CSS, but all I am selecting is the very first td. What am I doing wrong?
CSS
.teamStats > tbody > tr > th:first-child {
font-size: 20px;
}
HTML
<table class="teamStats">
<tr>
<th>
<span id="stats0Name"></span>
<br />
<span id="stats0Double"></span>
<br />
<span id="stats0Triple"></span>
<br />
<span id="stats0Quadra"></span>
<br />
<span id="stats0Penta"></span>
</th>
<th>
<span id="stats1Name"></span>
<br />
<span id="stats1Double"></span>
<br />
<span id="stats1Triple"></span>
<br />
<span id="stats1Quadra"></span>
<br />
<span id="stats1Penta"></span>
</th>
<th>
<span id="stats2Name"></span>
<br />
<span id="stats2Double"></span>
<br />
<span id="stats2Triple"></span>
<br />
<span id="stats2Quadra"></span>
<br />
<span id="stats2Penta"></span>
</th>
</tr>
</table>
TLDR: I am trying to set a style for all stats#Name, and I am struggling with mapping it to a CSS.
You are almost there:
.teamStats > tbody > tr > th span:first-child {
font-size: 20px;
}
.teamStats > tbody > tr > th > span:first-child {
font-size: 20px;
}
<table class="teamStats">
<tr>
<th>
<span id="stats0Name">this</span>
<br />
<span id="stats0Double">not this</span>
<br />
<span id="stats0Triple">not this</span>
<br />
<span id="stats0Quadra">not this</span>
<br />
<span id="stats0Penta">not this</span>
</th>
<th>
<span id="stats1Name">this</span>
<br />
<span id="stats1Double">not this</span>
<br />
<span id="stats1Triple">not this</span>
<br />
<span id="stats1Quadra">not this</span>
<br />
<span id="stats1Penta">not this</span>
</th>
<th>
<span id="stats2Name">this</span>
<br />
<span id="stats2Double">not this</span>
<br />
<span id="stats2Triple">not this</span>
<br />
<span id="stats2Quadra">not this</span>
<br />
<span id="stats2Penta">not this</span>
</th>
</tr>
</table>
try the following:
.teamStats th span:first-child{
...
}