Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to create an html page exactly like the demo image:
I have created all three buttons using anchor tag with data-role=button with corresponding color and text. But now what i want is to align those circles in the way the image is shown and bring them in center of the html page. Please help me.
Thanks in advance.
Working example: http://jsfiddle.net/Ey6Yb/1/
HTML :
<div id="button-container">
<a data-role="button" id="btn_gotohomepage" class="button_eclipse">My account</a>
<a data-role="button" id="btn_gotologinpage" class="button_eclipse">Services</a>
<a data-role="button" id="btn_gotolistpage" class="button_eclipse">Offers</a>
</div>
CSS:
#button-container {
width: 145px;
height: 255px;
margin:0 auto;
}
.button_eclipse {
width: 100px !important;
height: 100px !important;
border-radius: 50% !important;
color: rgb(255,255,255) !important;
}
.button_eclipse .ui-btn-inner {
border-radius: 50% !important;
height: 80% !important;
}
.button_eclipse .ui-btn-inner .ui-btn-text {
display: block !important;
margin: 28px 0 0 -17px;
width: 95px !important;
height: 20px !important;
text-align: center !important;
/* TEXT CHANGES */
font: 14px Calibri,Arial !important;
text-shadow:1px 1px #AD4816 !important;
}
#btn_gotohomepage {
background: rgb(247,107,33) !important;
}
#btn_gotologinpage {
background: rgb(255,165,33) !important;
margin: -30px 0 0 40px;
}
#btn_gotolistpage {
background: rgb(157,16,33) !important;
margin: -30px 0 0 0;
}
EDIT :
Here's a solution centered horizontally and vertically : http://jsfiddle.net/Ey6Yb/3/
Change in your css file with below script:
.ui-content {
border-width: 0;
margin: 0 auto;
overflow-x: hidden;
overflow-y: visible;
padding: 15px;
width: 150px;
}
.btn_eclipse_services {
background: none repeat scroll 0 0 #FFA521 !important;
border: 0 none !important;
border-radius: 50% 50% 50% 50% !important;
color: #FFFFFF !important;
height: 100px !important;
margin-left: 35px;
margin-top: -30px;
width: 100px !important;
}
.btn_eclipse_offers {
background: none repeat scroll 0 0 #9C1021 !important;
border: 0 none !important;
border-radius: 50% 50% 50% 50% !important;
color: #FFFFFF !important;
height: 100px !important;
margin-top: -30px;
width: 100px !important;
}
Demo:
and for more you can check this link How to Center Anything With CSS
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 9 months ago.
Improve this question
I have a white space on bottom of this page (Learndash lesson page):
https://academiademeditacion.com/lecciones/introduccion-y-postura-de-meditacion/
It does not happen with the other posts or pages in the website. I have tried the following CSS and nothing appears to work. I do not find the problem. I did solve the top blank space though.
.container {
height: 100% !important;
max-height: 100% !important;
width: 100% !important;
max-width: 100000px !important;
padding-top: 0px !important;
padding-bottom: 0px !important;
margin-top: 0px !important;
margin-bottom: 0px !important;
}
#page-container {
height: 100% !important;
max-height: 100% !important;
padding-top: 0px !important;
padding-bottom: 0px !important;
margin-top: 0px !important;
margin-bottom: 0px !important;
}
.ld-tabs {
margin-top: 0px !important;
margin-bottom: 0px !important;
padding-top: 0px !important;
padding-bottom: 0px !important;
}
Thank you for your time.
Delco
If you follow the tree of your DOM, you'll discover that one of the elements has margin set to 1em by this rule:
.learndash-wrapper .ld-course-status.ld-course-status-not-enrolled {
display: flex;
background: #f0f3f6;
padding: 1em 0;
margin: 1em 0;
border-radius: 6px;
}
I'm trying to override an inline style set by a 3rd party API,
the element in question
<li class="BrainhubCarouselItem BrainhubCarouselItem--active"
style="padding-right: 25px; padding-left: 25px; width: 225px;
max-width: 225px; min-width: 225px;"/>
I have tried selecting the element like so
li.BrainHubCarouselItem.BrainHubCarouselItem--active {
padding-left: 3px !important;
padding-right: 3px !important;
width: 100px !important;
min-width: 100px !important;
}
However none of the styling is taking place
Change BrainHubCarouselItem to BrainhubCarouselItem (H to h)
li.BrainhubCarouselItem.BrainHubCarouselItem--active { .... }
So your css would look like this
li.BrainhubCarouselItem.BrainhubCarouselItem--active {
padding-left: 3px !important;
padding-right: 3px !important;
width: 100px !important;
min-width: 100px !important;
}
I'm trying to put the logo to overlap the background image (see screenshot below) div with
position: absolute;
for the .header div and
position: relative;
for the .logo-svrs div
It seems that the external div will not overlap the .bg-banner. The overflow: visible didn't work either. No success.
I had to show the header of the logo by putting the
display: visible;
to be able to see the location of the logo. On the screenshot below, the right screenshot is what I need.
HTML
<div class="header">
<img src="imgs/logo-svrs.png" class="logo-svrs" alt="Sorenson VRS">
</div>
<div class="bg-banner">
<div class="notice-wrapper">
<div class="notice-overlay">
<div class="notices effect">
<div class="box-left-bad">
<img src="imgs/exclamatory.png" alt="Warning! - Sorenson VRS">
<p class="good">WARNING!</p>
</div>
<div class="box-right-bad">
<p>We are currently experiencing a technical difficulty that may be impacting our service. You may want to try restarting your device (VP, VP2, PC, Mac or mobile device) to see if this resolves the issue. At this time, we do not know when the technical difficulty will be resolved. We are working to quickly resolve the problem. This message will no longer appear on this page when the issue is resolved.</p>
<p>Thank you for your patience.</p>
</div>
</div>
</div>
</div>
CSS
#media screen and (max-width:732px) and (min-width:425px) {
.logo-svrs {
position: relative !important;
display: block !important;
width: 114px;
height: 29.5px;
margin: 0 auto;
z-index: 9999;
border: solid #ff0000 3px !important;
overflow: visible !important;
}
.header {
display: visible;
}
.bg-banner {
position: absolute !important;
background-image: url(../imgs/apply_header.jpg) !important;
background-repeat: no-repeat;
background-size: 100% 40% !important;
z-index: 0;
}
.notices {
position: relative !important;
width: 370px !important;
height: 350px !important;
text-align: center;
margin: 0 auto;
margin-top: 200px !important;
z-index: 9999;
border-radius: 5px !important;
box-shadow: 0 0 10px rgba(0,0,0,0.5) !important;
-moz-box-shadow: 0 0 10px rgba(0,0,0,0.5) !important;
-webkit-box-shadow: 0 0 10px rgba(0,0,0,0.5) !important;
-o-box-shadow: 0 0 10px rgba(0,0,0,0.5) !important;
}
You could move the .header div inside the .bg-banner div and add this
css:
.header {
display: visible; /*this is not valid*/
position: absolute;
top: 60px;
left: 0px;
right: 0px;
}
Here is a possible solution:
https://jsfiddle.net/kd91t26L/3/
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Ran into this problem when I was trying to add shadows to the thumbnail border image. Is there any way around this? :s
Here's the chunk of the code:
#content .item{
width: 285px;
height: 240px;
float: left;
margin: 0 10px 10px 0;
padding: 15px 0 0 15px;
background: url(../images/thumbnail.png) no-repeat;
background-size: 285px 240px;
box-shadow: -5px -5px 10px #CCC;
}
http://jsfiddle.net/ju3hxjuu/4
What is your problem Please Clearly Specify.
If you are talking about the white border around your images + shadow.
Then please note that the adding you just used making that white border because your div is larger than that of image inside that. If you want that shadow appear only around your images then you have to remove padding. like this :
#content .item{
width: 285px;
height: 240px;
float: left;
margin: 0 10px 10px 0;
background: url(../images/thumbnail.png) no-repeat;
background-size: 285px 240px;
box-shadow: -5px -5px 10px #CCC;
}
jsfiddle: http://jsfiddle.net/harshdand/ju3hxjuu/5/
u dont actually require an image to create thumbnail background
Html
<div class="item">
<img src="http://i.imgur.com/t2cfwup.png" alt=""/>
</div>
Css:
body{
background-color: #EEE;
}
.item{
width: 285px;
height: 240px;
float: left;
margin: 10px;
padding: 15px;
background-color:white;
background-size: 285px 240px;
box-shadow: 10px 10px 10px #CCC;
}
.item img{
width:100%;
}
We are pulling code from one of our websites (which has full width content) and attempting to use a similar media query on a different site whose content includes empty sidebars. The main issue is that in mobile views, our page maintains those sidebars and crunches everything into a skinny column. The page has a form on the right with an image to the left, logo above, company logos below, and text below company logos.
Any suggestions on which piece of this I should be messing with to fill the full width in mobile? Also, we are operating these properties within HubSpot's COS.
Here is what we are pulling:
<style>
#media (max-width: 768px) {
.testimonials {margin-top:500px;}
.row-fluid-wrapper.row-depth-3.row-number-3 {background: #FFFFFF;}
}
.inner-form{
margin-left: 68% !important;
max-width: 300px;
margin-top: 20px;
position: relative;
z-index: 2;
}
.outer-form{
height: 345px;
}
.needs-background{
background: url(http://cdn2.hubspot.net/hub/362750/file-830706138-png/quote_us_medicare/pic.png) no-repeat; padding-bottom:100px;
}
#media(max-width:767px){
.needs-background{
background:initial !important;
}
.inner-form{
margin: 0 auto !important;
height: initial;
margin-top: initial;
}
}
#hs_cos_wrapper_module_1396381482147112 input[type="submit"] {
font-size: 16px !important;
display: inline-block !important;
color: #ffffff !important;
text-align: center !important;
margin-right: 2px !important;
margin-bottom: 15px !important;
margin-top: 15px !important;
padding-right: 35px !important;
margin-left: 2px !important;
padding-bottom: 12px !important;
padding-top: 12px !important;
font-weight: bold !important;
line-height: 30px !important;
border:2px solid;
border-radius:10px;
border-color: #D1D1D1;
}
#media(min-width:768px){
.small-screen-image{
display:none !important;
}
}
</style>
It's hard to tell without seeing the HTML code. But from what you describe, you could use the mobile media queries to grab the sidebars and set the width to zero and display: none. Then you could set the width of the main form in the same query to fill the width of the screen.