Simply put, what's the best way to simply add a store-wide background image in the RDW theme ?
I'm using the default RwD theme in Magento 1.9.2, and I can't seem to figure out how to just add an image, not insert it in CMS, not a block, just a static background image on the whole page instead of the default white colour.
I've been trying to add it, like you usually would, in styles.css
body {
margin: 0;
text-align:center;
font-family:futura;
background-image:url(../images/Fond-Portail.jpg);
background-size: 100% 100%;
background-position: center top;
background-attachment: fixed;
}
The URL should be correct, this is usually a very simple task but I think RWD makes it harder. The only solutions I've seen to this problem, while searching, were to use a community module, is it really that complicated or am I missing something ?
You can use the background size property like this. background-size:cover; and you can also try background-size:contain; if it works for you.
Forgot about this question! Here's how I fixed it :
First of all don't forget (like I did) to remove lines like background: #FFFFFF;, otherwise the color will be overlayed on top of your image.
Turns out you have to change this at multiple lines for RWD's styles.css,
I added the background image in BASE body{},
removed the colored background in RESET body{},
and changed the background color and size of GLOBAL .wrapper{} (depending on the way it's configured for you, I changed the width and made it partially transparent).
Related
Using template engine as PUG
Html body
nav#navbar
ul.flex-container
div#logo
img(src='/static/logo3.png')
This is what image logo3.png looks
Can you suggest any css property?
Or photoshop tool to do it.
Searched but found opacity property which doesn't help.
You should use Google for more of these simplest tasks. This is not the right place to ask these type of questions. You can use an online background remover like https://remove.bg to remove backgrounds if you are not familiar with image editing apps. Btw, here's your updated image:
We can use background remover online tool as Vivek mention.
We can also do it by using css *Invert which changes white background to black. We can also use contrast and other property for it *Css filter function
#logo img{
filter: invert(1);
height: 50px;
width: 60px;
}
This is result of invert function
Thanks everyone who helped me in this!
Unfortunately this image is not transparent, you can see the gray and white chessboard pattern in the background.
I suggest you should use a photo editing app to select the content and delete everything other than the selection.
I got issue with background image on my webpage (won't show). I tried to place it in different <div>s but I cannot find solution, how to solve it. Also I tried to find solution here, but nothing worked for me. I don't have written long path to image, because all is in one folder. Also I know, I have it little chaotic.
I don't want to repair my wrongs, but just want to know how I can solve it and why it not work.
Here is my HTML source
And here is my CSS source
Place the URL within quotes, within the CSS file in the background property of the CSS file. url(limo.jpg) should instead be url("limo.jpg")
Depends what browser you're on. Try putting limo.jpg in quotation marks and adjusting to background-image:
body {
margin:0;
padding:0;
line-height: 1.5em;
background-image: url("limo.jpg") no-repeat center fixed;
background-size: cover;
}
I have the following Squarespace website. You can login to the site by clicking visitor access and typing in the code.
I'd like to change the background of the website by using the followng background image:
https://hethuisvandelingerie.squarespace.com/assets/bgs/bg8.png
I tried to do this with a CSS code to add a background image to the div with ID "canvas". This is the code I used:
#canvas{background-image: url('assets/bgs/bg8.png');}
However, this code does not seem to add the background image?
Any of you have an idea on how to solve this issue?
Take a look on your main wrapped on your #canvas div. Try to use the same CSS code. Hope it helps!
main {
background: url(https://static1.squarespace.com/static/ta/58639728d2b857b308f66598/404/assets/bgs/bg8.png)
}
In site.css, look for this entry and remove the background line from #main. You've applied the background image to #canvas but #main is displaying over #canvas and #main's background is covering the background image applied to #canvas
#main {
background: #fcfcfc;
...
Try removing the single quotes from the path
#canvas{background-image: url(assets/bgs/bg8.png);}
If that doesn't work
Make sure that you entered the right path.
Double check that the id of the element is in fact canvas
(I personally think it's a less than optimal name since canvas is now also a class)
I have a problem. Im fairly new to web design. I'm making a site with little images of doors that appear opened when I mouse hover on them. They will later contain links.
the code is
<table><tr><td background="usa-inchisa2.png" height="232px" width="181px" id="usa"></td> </tr>
and I have an external css :
#usa {
background-image: url('usa-inchisa2.png');
height:223px;
width :181px;
}
#usa:hover {
background-image: url('usa-deschisa2.png');
When I hover on I get this:
There is sort of residual line at the bottom of the image. I don't know where it comes from. At one point I managed to remove it but I can't remember what I did. Does it have anything to do with the table border?
Can you help me please? Thank you
Although I agree with #ajp15243 , I would solve your problem by trying this:
#usa {
background-image: url('usa-inchisa2.png');
background-repeat:no-repeat;
height:223px;
width :181px;
}
#usa:hover {
background-image: url('usa-deschisa2.png');
As you probably notice, I put "background-repeat" to "no-repeat". This is because it looks like you have more than one image at that screenshot. And the image you're having problems with is a couple of pixels smaller than the rest of the images. Since the height of a table row by default is the same for all cells in that row, the background image is repeated in the Y axis.
Please Use this CSS
#usa {
background-image: url('usa-inchisa2.png');
background-repeat:no-repeat;
height:223px;
width :179px;
}
I'm simply trying to keep the body color from spilling inside the middle of my page (between the 2 sidebars), which I want to keep white.
I'm kind of building this template from scratch and really want to do it the right way so that I can use it for other html projects as well. Could someone tell me what I'm doing wrong and what I could do better to make the css work?
Thanks!
URL here
put this style for your container:
#container {
margin:0 auto;
width:900px;
background:white
}
This is because by default background value for HTML element is transparent, so everything is see-through unless you specify otherwise