I've been put in charge of redesigning our communities Sponsor page, Currently this is what it looks like, http://core2062.com/sponsors/ and now I've redesigned it using Flexboxes: https://diedrich.co/img/uploads/de9ea0e2569a8051f8703c99d637f85b.jpg
My question is...How do I Put text in the bottom border I created around each image?
You can't put text in a border. Use a background color on the element holding the text and apply a border(if required) to that
Demo
HTML
<div class="border">
<h1>Diamond Sponsors</h1>
</div>
CSS
.border {
background-color: black;
color:white;
border-top:5px solid orange;
text-align:center;
}
You can't put text in a border.
You can either make an element with a background color and put the text in that or absolute position the text on top of the border.
Related
I want to add a border to a link but only if the link contains text:
a, a:visited { border: 1px solid black; }
However this also adds a border to images that are linked:
<a><img src='...' /></a> <!-- I don't want a border around this -->
How would I just ensure any text or non-images inside the tag get the border, but not the actual images?
Thanks very much!
I tried webfilters to change the white background of this image looking at this:
Change color of PNG image via CSS?
Not sure if this is the way to change the whitebackground of this image:
http://i.stack.imgur.com/AZRrE.png
Is it possible to change this through css?
You need to use a png that has a transparent background - the one you are using has a white background. For example.
.red {background-color:red;}
.blue {background-color:blue;}
.green {background-color:green;}
<div class="red"><img src="http://i.imgur.com/UAdT2Jd.png" /></div>
<div class="blue"><img src="http://i.imgur.com/UAdT2Jd.png" /></div>
<div class="green"><img src="http://i.imgur.com/UAdT2Jd.png" /></div>
If you do a search for radio button png you should be able to find a better one than the one I have used (as mine has some rough edges that are showing up)
Is it possible to change this through css?
No. If the image had some transparency, you could change the background-color (and/or background-image) of its parent element, like so:
<span class="thing"><img src="your-semi-transparent-image.png"></span>
And in the CSS:
.thing {
background-color: aqua;
/* This will show through the transparent region of the image */
}
I have an element that has a bottom border and it I would like to show it on top of an image, however, when I move the relevant div down (using negative bottom margin) the border goes under an image element that is underneath. Is there a way to set it on top?
I tried z-index but to no avail. And I have to have the "top" div have the border.
<div class="top">One</div>
<div class="block"><img src="http://placekitten.com/200/300"></div>
.top {border-bottom:5px solid red; margin-bottom:-3px; z-index:5;}
http://jsfiddle.net/gdRWy/1/
Image hosted by Placekitten and taken by: Pieter Lanser
Thanks guys
http://jsfiddle.net/gdRWy/3/
position:relative; /* this is enough */
See my earlier comment
<div class="top">One</div>
<div class="block"><img src="http://placekitten.com/200/300"></div>
.top {border-bottom:5px solid red; margin-bottom:-3px; z-index:5; position:relative;}
How can i make a fading text inside
<div class="box">
<p>some text, some text</p>
<div class="fading"></div>
</div>
.box {
width: 200px;
}
.fading {
background: url('img/fading.png') no-repeat 0 0;
}
but what if i have not a white background for example like here: http://beta.ruh.kz (ПОПУЛЯРНЫЕ СТАТЬИ - called block with text)
How can i do a png fading trick if there's not a white background?
Your Question is hard to understand but i am trying to help you.
if you want to fade image or text use fading{opacity:0.7;} you can change the value accordingly.
or if you want to use an image on coloured background you need to make a transparent png image as in the reference site ...
On this pages:
http://webdesignerwall.com/tutorials/css-gradient-text-effect
http://css-tricks.com/text-fade-read-more/
There are tutorials for your problem
In a <div> there are two <span>. One pulls in an image of a QR code from
http://chart.apis.google.com
The other <span> next to it is just text with a link to download the QR. The designer had envisioned that the DOWNLOAD link would align to the bottom of the image, the challenge is that the image has an unknown border. I understand that this will mean some trial and error to get it visually right.
I tried adding padding and margins but then it sends both <span> a bit higher. I added a red outline for visual reference
.qr_image { position:left; outline: 1px solid red ; }
.qr_download { color: #1d8cd2; text-decoration: underline; outline: 1px solid red; }
By default an image will align with a text on the bottom border in the HTML specs.
<span><img src="http://img_url" /></span>
<span>text</span>
Should produce an image with a piece of text to its immediate right with bottom aligned. Isn't this what you wanted?
Since I cannot see your example, I'm assuming that you are talking about having a CSS border on the image? So
<span><img src="http://img_url" style="border: 4px solid black" /></span>
<span>text</span>
But the text would still be aligned to the bottom of the image with the border. If this is not what you are asking, could you give a more specific example?