body{font-family:Georgia;background-image:url('https://content.codecademy.com/courses/learn-css-selectors-visual-rules/hypnotize_bg.png'); }
.header{background-color:blue;text-align:center;}
.about-me{font-size:20px;opacity:0.5;}
.title{font-weight:bold;}
h1{color:azure;}
I was expecting the image to cover the background...
https://content.codecademy.com/courses/learn-css-selectors-visual-rules/hypnotize_bg.png is a blank image. If you just try to go to this URL it's a plain white box.
Related
I use Fancybox3 to display some images and I want to place a text on top of an image. This works when i edit the javascript file with this:
test
With this I have text on the actual image. But this text is big when Fancybox zooms the image in and out. Why is this happening and is there a way to solve this?
I want a simple image download text on the image instead of below the image.
You can use .fancybox-is-scaling class name to hide your text while image is zooming, similarly to this demo - https://codepen.io/fancyapps/pen/ePYNZo.
The script uses CSS transform: scale() for zooming to improve performance, but the side-effect is that everything scales withing the container.
Any idea what would cause a fax's printed text to look like this.
I think it could be a dpi issue, the odd thing is all the text that is printed out with white dots in it is directly inside an html tag. I have some text elsewhere on the page not directly wrapped in a span/h1,h2,h3,h4/p tag and it is printing out correctly. Also a gif image on the page is printing out with a similar result. The color is set at #333 on all elements. Font size is in pixels as well. Would setting it to points help? Looking for ideas to fix this with print css.
The difference was the black that was being used. The text in the image is #333 and I switched the color of the text to #000000 for "true black" and that fixed it!
Hi i was going through a website where they used a very unique (according to me) background. they are mixing a color with an image and using it as background. the image is like
Then they are mixing some yellow color in it & it become like this
When i went through the code they were using something like this
background: #f6b93c url(bg1.png);
but it did not work for me!
Please help me out?
That is nothing but a short hand syntax
background: #f6b93c url(bg1.png);
So the above code simply means
background-color: #f6b93c;
background-image: url(bg1.png);
For more info on background short hand syntax
Demo
a png image with transparency and bg color will do the trick,
Otherwise if it is a jpeg,
the color will fill the rest of the part(for eg:in a div), the image wont cover.
what was happening with this background: #f6b93c url(bg1.png);
fill the color #f6b93c then on the top of that place the image, so it was a %0%(for eg.) transparent image, this will end up with a mixer of both
with latest CSS3 technology, it is possible to create texured background. Check this out: http://lea.verou.me/css3patterns/#
but it still limited on so many aspect. And browser support is also not so ready.
your best bet is using small texture image and make repeat to that background. you could get some nice ready to use texture image here:
http://subtlepatterns.com
The image bg1.png does not seem to be in baseurl. You should try relative url. eg. if you have image inside 'images' folder, "images/bg1.png" should work.
I use the lightbox control (http://leandrovieira.com/projects/jquery/lightbox/ ) to display an image.
It's Ok, but the displayed image is closed the bottom of screen, I hope to make the image to close the top of screen, how can I do ? Thanks!
Add a top:0px in #jquery-lightbox under jquery.lightbox-0.5.css
For Instance,
#jquery-lightbox {top:0px;}
I have an Imagebutton with an empty ImageUrl but there is some text in the AlternateText. In IE, it is displayed with a red cross and the alternatetext next to the red cross. In FF, only the alternatetext appears with no red cross image and that is what I want. Plz, I need to work with Imagebutton...dont suggest replacing it with linkbutton or anything else.
So how can I get rid of the red cross thing in IE.
THanks
Ignoring the questionable scenario of having to work with the ImageButton, the only solution I see is creating a transparent 1x1 gif and assign this URL instead of an empty URL in case no image should be displayed, but the alt text still shown.
That said, if you are after the tooltip text I'd strongly recommend using a div or an other suitable element with the title attribute set instead.
Eventually, I did two images for the Image button with the alternate Text as the text inside the images. One image had an underline for the text. Added mouseover and mouseout events where the src of the images changes. So it appears as a link.