I'm trying to implement a transparent header for mobile view like this:
For comparison, my current header renders above my hero image and has a white background. It looks like this:
What can I do to have my header render on top of the hero image with a transparent background?
Change the background style of the header by adding background: transparent;
well you can achieve this by setting the CSS's background attribute to transparent or #0000.
make sure you put this in a media query for only mobile screens.
Related
Problem occur on Sambungs tables. I have background image set on body.
Css look like
html, body{
background: url('img/background.jpg') no-repeat;
background-position: top; // i tried also cover, fixed etc
}
Webpage is quite high, like over 2000px , where background image takes first 600px, and it could be fine for me, but when i click to hide some box on the bottom of the page, background will automatically appear at the visible part of a screen and it will be eareased from the top of the page. Page isn't realoading during hiding boxes on page, that's why I don't really know how to solve this problem.
Any suggestions ?
Problem solved. I had to input background into div#wrapper. It solved my problem with rendering of background image
I want the background to be displayed from the line drawn on the screenshot:
http://img29.imageshack.us/img29/4707/wjm7.png
I tried to use
background : ('path/to/image') 0 650px repeat-y
But it the light part of the image moves and it looks ugly. All I want is simply to background look on the site like on the screenshot, but without the dark part in the bottom. Thats why I want it to repeat from the red line.
Now the css is this way:
background : url('path/to/image') top center
You can set px values instead of top
background : url('path/to/image') -430px center;
Repeating the background like this will not be possible. You'll just have to crop your image and use repeat
I'll suggest to use two backgrounds. I.e. set the repeatable part as a background of the body and the other part as a background of your main container.
I have a page with a large background image. The menu and main content portions are 900px and centered. Rather than just fill the menu background with a color, I'd like to simply blur the background image. I'd also like the blurred part to move appropriately when the page is resized so I can't just blur a section of the background. How is the best way to achieve this? I tried putting a semi-transparent .png as the background to my menu div but that didn't work, I didn't see any effect. Does anyone know how to do this? Thanks.
The site that inspired the question is this one: http://www.bluespooncoffee.com
http://jsfiddle.net/MAbpx/
background: rgba(255,255,255,0.5);
This makes the background of something semi transparent because the last value is the alpha (transparency value). Adjust as needed.
On the twitter.com login screen, there is a background which features a world map behind the text.
I've had a look and I'm not sure how it's being rendered. I found this one background image (http://a2.twimg.com/a/1316626057/phoenix/img/front/bg.png) which looks more like the color behind the globe overlay.
Any ideas how the map part is being generated?
The map is part of the logo image, which is #doc’s background image.
The div that takes up the whole page (<div id='doc'>) has this style set on it:
background: url("../img/front/logo-map.png") no-repeat scroll center top transparent
This makes that image the background of the div, and therefore the page.
That picture is not the world! that is just the body's background picture. The world, is background of this div:
<div class="route-front" id="doc">
and is in this folder:
../img/front/logo-map.png
related with this stylesheet file:
http://a2.twimg.com/a/1316626057/phoenix/css/phoenix_core_logged_out.bundle.css
I have a a background image on my html with css page, from blue at the top, to white at the bottom.
However, the image 400x800 and the page is much longer, so it repeats.
The page length varies all the time.
Is it possible to solve this so the background stretches to the page length somehow? or maye make it not repeat and make the background white with the image on top?
If yes, how please?
The easiest is to set the image to not repeat and then set the background color the same as one end of the gradient:
body {
background: white url('yourImage') repeat-x top left;
}
Getting a gradient to stretch to fit the window is doable, but is more work and would require some javascript.
I know that there are jQuery / Javascript methods of accomplishing this:
Resizable Backgrounds with jQuery
Stretch background image - jQuery - Demo
but besides resorting to solutions like those - you could:
Select a pattern for your background that repeats (textures etc.)
Create a very long background image that could handle most navigation that your page
would deal with.
Another alternative is to make your gradient the same at both ends with the maximum colour difference at the 50% mark.