this site has been giving me some issues with the width of some elements with cross-browser compatibility for the tablet and phone styling.
The class is .p_phoneand .p_phone a
.p_phone {
font-size: 20px;
width: 145px;
left: 40%;
margin: 0 !important;
height: 30px;
opacity: 1;
top: -4px;
text-align: center;
color: #fff;
position: relative;
}
.p_phone a {
color: #fff;
background-color: #1968a1;
font-weight: 800;
padding: 5px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
Basically, It needs to match the width of this class, which is a image, which it does on chrome and opera, but on safari, firefox, and edge, it does not match, and breaks to the next line.
.p_call {
font-size: 20px !important;
top: -13px;
left: 40%;
width: 145px;
margin: 0;
background-image: url(http://dchna4xuxekpx.cloudfront.net/wp-content/uploads/2016/06/15142416/call-us.png);
vertical-align: middle;
height: 40px;
line-height: 40px;
text-align: center;
position: relative;
float: left;
padding: 0;
}
Increasing the width to 150px fixes it, but it is then too wide for the image.
How it needs to be:
Try Changing these class's (have checked them on this link provided by you)
.textwidget {
font-size: 18px;
position: relative;
width: 160px;
margin: auto;
}
.p_call {
font-size: 20px !important;
top: -13px;
left: 40%;
margin: 0px;
background-image: url('http://dchna4xuxekpx.cloudfront.net/wp-content/uploads/2016/06/15142416/call-us.png');
vertical-align: middle;
height: 40px;
line-height: 40px;
text-align: center;
position: absolute;
float: left;
padding: 0px;
width: 100%;
background-size: 100%;
}
.p_phone {
font-size: 20px;
margin: 0px !important;
height: 30px;
opacity: 1;
top: 27px;
text-align: center;
color: #FFF;
position: absolute;
width: 100%;
left: 40%;
}
.p_phone a {
color: #FFF;
background-color: #1968A1;
font-weight: 800;
padding: 5px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
display: inline-block;
width: 100%;
}
The divs belonging to p_call class and p_phone were not wrapped properly by textwidget class. Hence we have to give two different width's, now since textwidget is wrapping both the class's, they will have same width. Hope it helps. Tested on both chrome and firefox.
Try to add this to your styling block for .p_phone a:
white-space: nowrap;
Related
I need the grey half-circle to include the quote so that it will be the correct height, but I also need that line to be able to overflow from it's containers.
.CONTAINER {
width: 70%;
position: relative;
margin-left: 15%;
margin-right: 15%;
margin-top: 25%;
margin-bottom: -10px;
overflow: hidden;
}
.halfCircle {
max-width: 100%;
background: darkgray;
border-top-left-radius: 100%;
border-top-right-radius: 100%;
border-bottom: 0;
text-align: center;
overflow: visible;
margin-bottom: -10px;
}
#QUOTE22 {
text-align: center;
margin-top: -32px;
font-size: 1.3em;
letter-spacing: 2px;
font-weight: 30;
}
#PLogo {
position: relative;
margin-left: auto;
margin-right: auto;
height: 200px;
width: 200px;
}
#FrontQuote {
height: 1.3em;
width: 1.3em;
position: relative;
right: -5px;
}
#QUOTE {
text-align: center;
line-height: 100%;
letter-spacing: 1px;
font-size: 1.3em;
}
#QUOTE12 {
text-align: center;
line-height: 100%;
letter-spacing: 0px;
font-size: 1.3em;
margin-top: 10px;
z-index: 100;
overflow: visible;
}
#BackQuote {
height: 1.7em;
width: 1.7em;
transform: rotate(180deg);
z-index: 100;
overflow: visible;
}
#stock1 {
position: absolute;
margin-top: -52.5px;
margin-left: -8px;
width: 101.5vw;
height: auto;
max-height: 500px;
filter: grayscale(1);
opacity: .5;
background: #121212;
z-index: -1;
}
<div class="CONTAINER">
<div class="halfCircle">
<img id="PLogo" src="https://static.wixstatic.com/media/058e45_e590acfd22c440f4b5c89450738f321d~mv2.png/v1/fill/w_438,h_438,al_c,q_85,usm_0.66_1.00_0.01/058e45_e590acfd22c440f4b5c89450738f321d~mv2.webp">
<p id="QUOTE12"><img id="FrontQuote" src="https://static.wixstatic.com/media/058e45_df55c46642a94f489cf76fa18cc13cb8~mv2.png/v1/fill/w_50,h_50,al_c,q_85,usm_0.66_1.00_0.01/Logo%20Quotes.webp"> WHAT WE LEARN WITH PLEASURE, WE NEVER FORGET
<sub><sub><img id="BackQuote" src="https://static.wixstatic.com/media/058e45_df55c46642a94f489cf76fa18cc13cb8~mv2.png/v1/fill/w_50,h_50,al_c,q_85,usm_0.66_1.00_0.01/Logo%20Quotes.webp"></sub></sub>
</p>
</div>
</div>
</section>
<section id="SKILLS">
<p id="QUOTE22">- ALFRED MERCIER</p>
<img id="stock1" src="https://media.istockphoto.com/photos/graphic-designer-drawing-on-graphics-tablet-at-workplace-picture-id865230556">
Some additional information, since the bot says I need more words:
I read on another post that someone suggested having a container around the half circle and have that be overflow:hidden so that the child of the child wouldn't be effected, but that hasn't worked for me below.
I'd prefer HTML or CSS answers only, since that's all I know at the moment... but if there's no other way, I'll try other languages.
It's going to be difficult for me to adjust position too much, but I read another comment somewhere that position might be an issue, so I tried to take position tags off of as many elements as I could.
position:relative; should bring it on top. You may add a z-index value if that is not efficient.
example
.CONTAINER {
width: 70%;
position: relative;
margin-left: 15%;
margin-right: 15%;
margin-top: 25%;
margin-bottom: -10px;
overflow: hidden;
}
.halfCircle {
max-width: 100%;
background: darkgray;
border-top-left-radius: 100%;
border-top-right-radius: 100%;
border-bottom: 0;
text-align: center;
overflow: visible;
margin-bottom: -10px;
}
#QUOTE22 {
text-align: center;
margin-top: -1em;
font-size: 1.3em;
letter-spacing: 2px;
font-weight: 30;
position:relative;/* added <====== */
}
#PLogo {
position: relative;
margin-left: auto;
margin-right: auto;
height: 200px;
width: 200px;
}
#FrontQuote {
height: 1.3em;
width: 1.3em;
position: relative;
right: -5px;
}
#QUOTE {
text-align: center;
line-height: 100%;
letter-spacing: 1px;
font-size: 1.3em;
}
#QUOTE12 {
text-align: center;
line-height: 100%;
letter-spacing: 0px;
font-size: 1.3em;
margin-top: 10px;
z-index: 100;
overflow: visible;
}
#BackQuote {
height: 1.7em;
width: 1.7em;
transform: rotate(180deg);
z-index: 100;
overflow: visible;
}
#stock1 {
position: absolute;
margin-top: -52.5px;
margin-left: -8px;
width: 101.5vw;
height: auto;
max-height: 500px;
filter: grayscale(1);
opacity: .5;
background: #121212;
z-index: -1;
}
<div class="CONTAINER">
<div class="halfCircle">
<img id="PLogo" src="https://static.wixstatic.com/media/058e45_e590acfd22c440f4b5c89450738f321d~mv2.png/v1/fill/w_438,h_438,al_c,q_85,usm_0.66_1.00_0.01/058e45_e590acfd22c440f4b5c89450738f321d~mv2.webp">
<p id="QUOTE12"><img id="FrontQuote" src="https://static.wixstatic.com/media/058e45_df55c46642a94f489cf76fa18cc13cb8~mv2.png/v1/fill/w_50,h_50,al_c,q_85,usm_0.66_1.00_0.01/Logo%20Quotes.webp"> WHAT WE LEARN WITH PLEASURE, WE NEVER FORGET
<sub><sub><img id="BackQuote" src="https://static.wixstatic.com/media/058e45_df55c46642a94f489cf76fa18cc13cb8~mv2.png/v1/fill/w_50,h_50,al_c,q_85,usm_0.66_1.00_0.01/Logo%20Quotes.webp"></sub></sub>
</p>
</div>
</div>
</section>
<section id="SKILLS">
<p id="QUOTE22">- ALFRED MERCIER</p>
<img id="stock1" src="https://media.istockphoto.com/photos/graphic-designer-drawing-on-graphics-tablet-at-workplace-picture-id865230556">
im currently in need of some help regarding this issue. Id like the loading gif to be placed above the drop down.
Here is the CSS for the dropdown and loading gif.
dropdown
.form-horizontal .control-group {
position: relative;
z-index: 0;
*zoom: 1;
}
here is the code for the loading image
.uiGridLoading,
.uiOtherLoading
{
position: absolute;
bottom: 11px;
right: 11px;
left: 11px;
top: 53px;
background: #ffffff;
/*z-index: 900;*/
}
.uiOtherLoading
{
bottom: 0px;
right: 0px;
left: 0px;
top: 0px;
}
div.uiGridLoading-outer,
div.uiOtherLoading-outer
{
display: table;
border-collapse: collapse;
width: 100%;
height: 100%;
}
div.uiGridLoading-inner,
div.uiOtherLoading-inner
{
text-align: center;
display: table-cell;
vertical-align: middle;
width: 100%;
height: 100%;
}
span.uiGridLoading-text,
span.uiOtherLoading-text
{
text-align: center;
background: url('/img/progress.gif') top center no-repeat;
padding-top: 47px;
font-size: 14px;
line-height: 22px;
color: #666666;
font-weight: 600;
display: block;
margin: 0 auto;
min-width: 32px;
}
As you can see the gif loading image is behind the drop down. I know z-index is not the problem
i have some CSS styling issues. first thing i have a from with 2 inputs and a button. the button is perfect positiond when i resize the window but the inputs dance around, why?
and het h2 this is appended when the button is pushed, the little arrow has to be always in the middle. Also the text needs to be always in the middle of the pop up, horizontal and vertical. Is this posible? and how?
here is the form:
#lname, #fname {
width: 90%;
height: 50px;
margin-top: 6%;
border-radius: 5px;
background-color: #1e2228;
color: #ddd;
border: 0px;
font-size: 2em;
position: absolute;
text-align: center;
}
#fname {
left: 40px;
top: 18px;
}
#lname {
left: 40px;
top: 84px;
}
#btn {
width: 100%;
height: 50px;
margin-top: 72px;
border-radius: 0 0 5px 5px;
background-color: #1e2228;
color: #ddd;
border: 0px;
font-size: 2em;
position: absolute;
left: 0px;
top: 128px;
}
here is the pop up window:
h2 {
margin: auto;
margin-top: 100px;
position: relative;
width: 50%;
height: 205px;
padding: 0px;
background: #2F3742;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
text-align: center;
font-size: 2em;
color: #8092AA;
margin: 100px auto 0 auto;
padding-top: 6%;
}
h2:after {
content: '';
position: absolute;
border-style: solid;
border-width: 0 20px 20px;
border-color: #2F3742 transparent;
display: block;
width: 0;
z-index: 1;
top: -20px;
left: 355px;
}
ofcourse you have to see this in action! here you go! http://codepen.io/shiva112/pen/dGMrWB
Why do you use absolute positioning? It's a really mess, but just add for your input elements margin-left:5%. For your heading arrow: h2:after{left:50%; margin-left:-20px; }And if you want to center the text vertical and horizontal, you need to wrap your h2 text content in span or any other element you like. Then set your h2 element style to: { display:table; width:100%; } and his child element to: { displat:table-cell; vertical-align:middle; }
Problem
I'm trying to create a dynamic info element that sits to the side of other linked DOM elements by setting a large margin. However, I'm stuck with a small issue as the text inside a p element that sits inside the containing div is flowing around the text in the preceding div, despite them not actually being nearby one another.
Fiddle of problem.
I've found that I can prevent this by making the preceding elements position absolute, however this presents its own problems and as such, if there were a better way to prevent the issue it would be much more ideal.
HTML
<br>
<br>
<p id="problem">Text which will cause word wrap.</p>
<div id="container">
<p>Text which is being wrapped around the text, despite the fact that the text is not nearby</p>
</div>
CSS
#problem {
display: block;
float: left;
height: 16px;
line-height: 16px;
margin-bottom: 0px;
margin-top: 2px;
width: auto;
}
#container {
background-color: rgb(255, 150, 150);
display: block;
font-size: 14px;
height: 188px;
left: 220px;
margin-left: 15px;
margin-top: -25px;
padding: 4px;
position: relative;
top: -22px;
width: 200px;
}
#container p {
color: rgb(216, 0, 12);
display: block;
font-size: 14px;
height: 96px;
line-height: 16px;
margin: 0;
width: 200px;
}
Edit: Updated fiddle with more context.
wrapper {
margin-top: 60px;
}
content {
background-color: #BBBBBB;
width: 300px;
}
content input {
float: right;
}
problem {
display: block;
float: left;
height: 16px;
line-height: 16px;
margin-bottom: 0px;
margin-top: 2px;
width: auto;
}
.control {
height: 30px;
width: auto;
}
container {
background-color: rgb(255, 150, 150);
display: block;
font-size: 14px;
height: 188px;
left: 300px;
margin-left: 15px;
padding: 4px;
position: absolute;
width: 200px;
}
container p {
color: rgb(216, 0, 12);
display: block;
font-size: 14px;
height: 96px;
line-height: 16px;
margin: 0;
width: 200px;
}
I have a following div structure
<div id="wrapper">
<div id="header">
<div id="storeFinder">
/* html goes here */
</div>
</div>
</div>
now when i zoom in or out from the browser, "storeFinder" moves right / left ...
I have searched online and found that need a wrapper around the "storeFinder" so that it does not move with the <body> and specifying the min-width also can solve the problem.
in my case, i already have a wrapper div and specifying the min-width also dint help me.
looking for help here very badly.
#wrapper {
background: white;
background-position: 50% 0px;
width: 984px;
margin: 0px auto 0 auto;
text-align: center;
}
#header {
width: 960px;
height: 60px;
margin: 0 5px 2px 5px;
text-align: left;
background: white;
display: block;
position: relative;
}
#storefinderdropdown {
position: absolute;
top: 8px;
float: none;
width: 270px;
height: 43px;
border: 5px solid #F1F1EF;
background: #F1F1EF;
z-index: 10;
margin: 20px 0 0 342px;
font-size: 10px;
font-weight: bold;
text-indent: 3px;
padding: 0;
}
Try putting a position: relative on the parent. That will confine the children's positions to be absolute according to the parent and not according to the document. This article gives more details and examples: http://css-tricks.com/absolute-positioning-inside-relative-positioning/
Your correct CSS code Working Jsfiddle here
#wrapper {
background: white;
background-position: 50% 0px;
width: 984px;
margin: 0px auto 0 auto;
text-align: center;
}
#header {
width: 960px;
height: 60px;
margin: 0 5px 2px 5px;
text-align: left;
background: white;
display: block;
position: relative;
}
#storeFinder {
position: absolute;
top: 8px;
float: none;
width: 270px;
height: 43px;
border: 5px solid #F1F1EF;
background: #F1F1EF;
z-index: 10;
margin: 20px 0 0 0px;
left:342px;
font-size: 10px;
font-weight: bold;
text-indent: 3px;
padding: 0;
}
Try this:
#storefinderdropdown {
position: absolute;
top: 8px;
left: 342px; /*Add This*/
float: none;
width: 270px;
height: 43px;
border: 5px solid #F1F1EF;
background: #F1F1EF;
z-index: 10;
margin: 20px 0 0 0; /* Change This*/
font-size: 10px;
font-weight: bold;
text-indent: 3px;
padding: 0;
}
May be this will be helpful for you.