Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
It might be really stupid and easy, but I spend two hours trying to get it.
I have a simple div with a class "payment"
<div class="payment">
</div>
and in css
.payment {
height: 289px;
width: 320px;
background-image: url('../images/pay/sprite_paywall.png');
background-position: 0 0;
background-repeat: no-repeat;
position: absolute; }
I checked the css file on the network, and saw the class there. I tried to delete the cache browser, but no luck. Anyone has an idea?
Try to use something like this : LINK
background: #f00 url('../images/pay/sprite_paywall.png') 0 0 no-repeat;
Instead of background image, im using background color. you are not specifying any left, top etc.. so there is no need to specify position.
Maybe the problem is the import of the CSS file to you'r html code. You have to ways to do that(always add the tags in head tag).
1- Using <link> tag like that:
<link rel="stylesheet" href="your/css/route_file.css" />
2- Using <style> that not requieres to import a file:
<style type="text/css">
.payment {
height: 289px;
width: 320px;
background-image: url('../images/pay/sprite_paywall.png');
background-position: 0 0;
background-repeat: no-repeat;
position: absolute;
}
</style>
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 6 years ago.
Improve this question
Here is my header code where I want to set the background.
<header>
<img src="images/MeMain.jpg" alt="Drawing of Me" class="profile-image">
<h1 class="tag name">Hello, Iām Me.</h1>
<p class="tag location">My home is Blank, Blank.</p>
</header>
Here is the associated CSS code:
header {
text-align: center;
background: url('images/portland.jpg') no-repeat top center ;
background-size: cover;
overflow: hidden;
padding-top: 60px;
}
If I code in the image to the html page it appears, but I can't get it to appear using url. I've tried moving the location of the picture, I've tried changing the url to (".../images/portland.jpg"). Nothing I've tried so far works.
It looks like you have one too many periods in the url path on your css. Also, sidenote, newer browsers don't need any quotes on the path.
Try this:
.header {
background: url(../images/portland.jpg) no-repeat center center fixed;
background-size:cover
}
You can even give your site a different background for a phone size screen like so:
#media only screen and max-width: 48em {
.header {background: url(../images/portland-portrait.jpg) no-repeat center center fixed;}
}
Source - http://fritzemedia.com/
the issue is that you have too many periods.
you should use
("../images/portland.jpg")
You had ...
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
i've been trying to change my input submit button background's image, i followed many tutorials but none of them helped. The button still doesn't appear. Here is the snippet of code.
<input type="submit" name="submit" value="" alt="submit">
input[type="submit"] {
background: url(../icons/submit_icon.png) no-repeat 0 0;
display: block;
height: 25px;
text-indent: -9999px;
width: 28px;
border: 0;
}
I tried your code and it worked, here is the fiddle :
https://jsfiddle.net/268rLw9v/1/
I think your problem is because of the size of the image (or of the input), look in my example, I changed the width and height of the input because the image I use is bigger.
width: 250px; height: 280px; // I used that because of the image size
Be sure that your image have an appropriate size.
You can also try these css properties to see what happens :
background-size: cover;
background-position: center;
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Can anyone help to check on this site?
http://chanbaneng.com/demo/
When in Firefox, all the content gets pushed to the right. In all the other browsers I tried (Chrome, Safari, and IE), it works just fine.
Is there anything wrong with the code?
Used to this way
ul.bjqs{
overflow: hidden; // remove this line in your css
}
==========================
your second problem solution is this
now define this css in your style sheet
#container{clear:both;}
Just change this class and set it again because its slider
ul.bjqs {
position: absolute;
list-style: none outside none;
margin: 0px;
overflow: hidden;
display: none;
}
I am sure there will be some calculations will be done on bases of resolutions so it will better to put in absolute position and then do other stuffs this will result in to same for all browsers
Please modify this
<ul class="bjqs" style="height: 380px; width: 100%; display: block;">
to
<ul class="bjqs" style="height: 380px; width: 100%; display: block; overflow: -moz-hidden-unscrollable;">
The simplest way I found to solve this without rewriting your code is:
Go to your li a selector (line 73) and remove height: 28px;
You a tags already get their correct height and setting it manually messes up with the flow of the display.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions concerning problems with code you've written must describe the specific problem ā and include valid code to reproduce it ā in the question itself. See SSCCE.org for guidance.
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
Improve this question
See http://www.levomedia.com/contact-us/
If your screen is of a good size there might not be a scroll so you will have to zoom in... but when there is a scroll and you move down the page, my theme forces my header to travel with you, which I would like to remove if possible.
What would be the best way of stopping this from happening, so that it stays in the same position and does not travel with you?
The Best thing would be to remove the relevant Js code , which is causing this.
I have found this
<script src="http://www.levomedia.com/wp-content/themes/sensitive/js/jquery.stickymenu.js?ver=3.6" type="text/javascript">
js code file inclusion in your page, just remove it, everthing should works fine, as you intend to.
this will also improve your page rendering time and efficiency :)
Happy Coding :)
you need to remove the css attribute :
position: fixed
Which you had used on the header.
Stop using the jquery.stickymenu.js script and things gonna be ok. It applies position:fixed to your header, when you scroll the page down and you don't need it.
Like this
please add position:fixed, top:0; width:100%; in .navbar-wrapper selector
and
please add position:relative; top:66px; in this selector .type-post, .type-post .post, .type-page, .type-page .post
CSS
.navbar-wrapper {
background: url("images/wild_oliva.png") repeat scroll 0 0 #EEEEEE;
margin-bottom: 20px;
padding-bottom: 0;
padding-top: 20px;
position: fixed;
top: 0;
width: 100%;
z-index: 1;
}
.type-post, .type-post .post, .type-page, .type-page .post {
margin: 0 !important;
padding: 0 !important;
position: relative;
top: 66px;
}
In your case, Js is adding the position:fixed attribute in topmenu once you scroll down.So you can do this by css.
convert this :
<div id="topmenu" class="container" >
to this:
<div id="topmenu" class="container" style="position:relative !important" >
If you dont want inline Css Make a class like this:
.container{
position:relative !important
}
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
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.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Improve this question
I'm total CSS/HTML noob.
I would really appreciate if you help me out.
I need to fix my button:
decrease activation field (hover) to the actual size of the button (without shadow)
when I hover cursor over button, how to get rid of 1st image left overs?
THANK YOU!
jsfiddle link:
http://jsfiddle.net/cRqhT/125/
HTML:
<html>
<body>
<div>
<a id="button" href="http://mysite.com"</a>
</div>
</body>
</html>
CSS:
div {
width: 820px;
height: 820px;
background: url('https://gator1174.hostgator.com/~mskparik/facebook/thx.jpg')
}
#button{
display: block;
width: 204px;
height: 116px;
background: url(https://gator1174.hostgator.com/~mskparik/facebook/111.png) no-repeat top left;
position: absolute;
top: 90%;
left:10%;
}
#button:hover {
background: url(https://gator1174.hostgator.com/~mskparik/facebook/222.png) no-repeat top;
}
I simply added a corner bracket where appropriate, and it seems to have fixed both problems. See JSFiddle here.
<html>
<body>
<div>
<a id="button" href="http://mysite.com"></a> <!--Notice extra corner bracket-->
</div>
</body>
</html>