Generate a Image like Object using CSS [closed] - html

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I am looking at generating the below image using CSS.
I've tried adding all the required information needed below.
The BgColor, Font-Color, Font Size, Font Family, Font Style. Please mention if any other data is needed.
The Font Text should be displayed in the middle of the image. How do I build CSS to get the text in the centre.

HTML
<div>WW</div>
CSS
div{ background:#ced6e9;
font:bold 46px arial; color:#315bb4;
width:100px; height:100px; line-height:100px;text-align:center}
Here is the Demo http://jsfiddle.net/9Dxza/1/

horizontal centering:
text-align : center;
vertical centering:
line-height : 100px;

background-color: green;
height: 35px;
width: 35px;
text-align: center;
line-height: 35px;
font-size: 18px;

Related

How to apply effects to a unicode character in CSS? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
How can I apply various effects, like increasing its size etc., using CSS to this arrow
https://jsfiddle.net/tnfLc58h/
So far I've been able to change its color.
HTML
<div class="down-arrow">
</div>
CSS
.down-arrow:after {
content:'\2193';
color: red;
}
edit: I want to make it responsive.
Since a pseudo element is an inline element, you need for example to give it display: inline-block (or block) for it to respond to width/height settings (though not if only to change font properties of course, as some comments assumed I meant).
.down-arrow:after {
content:'\2193';
display: inline-block; /* or block */
background: lightgray;
color: red;
height: 32px;
width: 40px;
font-size: 24px;
text-align: center;
}
<div class="down-arrow">
</div>
To increase the size of the content, you should set the font-size
Like so :
.down-arrow:after {
content:'\2193';
color: red;
font-size: 20px; // change to whatever
}
See updated EXAMPLE

Align text with image [closed]

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
How can I vertically align text inside the div with the image?
Fiddle: http://jsfiddle.net/C6pf7/3/
EDIT: I cannot use display:table; or height for div1
I tried putting the image as a background in the div that's one way of sort of doing it. Although you can use
vertical-align:middle
Heres a link to question already asked previously.
Vertically align text next to an image?
Use below Code:
<div id = "div1" style='float:left;width:100%'>
<p align='left' >
<img src="http://www.loriswebs.com/html-tips/images/delphinium-close1c.jpg"
id= "img1" style='float:left;'></img>
123
</p>
</div>
Set min-height: for #div
Like
#div1{
text-align: center;
vertical-align : middle;
border: 2px solid red;
min-height:80px;
}
Use line-height:75px in your css and add a new div with style="clear:both;"
Css:
#div1{
text-align: center;
vertical-align : middle;
border: 2px solid red;
line-height: 75px; /* Add this */
}
Updated Fiddle

Align elements in middle [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
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.
Closed 9 years ago.
Improve this question
I have the following page:
Page on JSBin
If you look at the top-right-hand corner, then you can see that the settings & chat pic and the username is aligning with the lower border of the profile picture.
How could I make all elements in top-right-hand-corner align in the middle of the top-bar?
The top-bar is supposed to look like that:
EDIT: I have applied the vertical-align: middle property to these elements. However, as you can see at ranganadh's JSBin, the image seems to be a bit too near to the lower corner. Any suggestions on that?
add vertical-align:middle property to class .top-right-button
change to
.top-right-button{
margin-right: 5px;
vertical-align:middle
}
Check JSBin
You need to modify your CSS as follows:
.right-stuff {
position: absolute;
bottom: 2px;
height: 100%;
right: 0px;
font-family: Roboto Condensed, bold;
font-size: 24px;
}
.top-right-button {
margin-right: 5px;
vertical-align: middle;
}
The vertical-align property is not inherited and must be specified explicitly.
By default, your right most image is aligned with the default baseline of the container block. Setting vertical align to middle gives a more pleasing view.
If you need to, use the bottom offset to adjust the overall vertical position of the .right-stuff block.
See demo at http://jsbin.com/uSiTOpU/16/edit
I hope i understand your edit well.
Try to change
#top-right-profile-image {
margin-top: 5px;
width: 40px;
height: 40px;
background-color: #ffffff;
}
to
#top-right-profile-image {
width: 40px;
height: 40px;
background-color: #ffffff;
}
It gives a better looking result.
I believe you simply need to add an valign="top" to your profile image.
<img valign="top" class="top-right-button" id="top-right-profile-image" src="//www.placehold.it/20x20"/ >

I can't affect image size with css but I can in regards to it's position [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
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.
Closed 9 years ago.
Improve this question
for some flipping reason I can't control the height of width of my image
.pop_image{
top: 10px;
width: 100px;
height: 100px;
position:absolute;
}
the html
<ul class="pop_image"><img src="1.jpg"></ul>
To controll the size of the image, you need to address the image on the CSS:
.pop_image img {
width: 100px;
height:100px;
}
Your CSS will determine the size of the <ul> list, not your image.
Try the following instead:
.pop_image img {
top: 10px;
width: 100px;
height: 100px;
position:absolute;
}
Try to add a display: block; in .pop_image class even if the ul is normaly a block...

Why my CSS button is not working? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
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
Closed 9 years ago.
Improve this question
I have a background img 120x30, but it's not showing in the full size..why?
Please look here http://f1u.org/en - under each article readmore button.
<a> is an inline element. So, an inline element in not take height, width , vertical margin & vertical padding in it's.
Then we have to define display:block in the css like this:
.comments-link, .readmore-link {
display: block;
}
Add display: block;
.comments-link, .readmore-link {
background: url("images/readmore.png") no-repeat scroll 0 0 transparent;
border: medium none;
display: block;
font-size: 11px;
height: 30px;
line-height: 30px;
padding: 0;
text-indent: 8px;
text-transform: uppercase;
width: 120px;
}
The a tags are inline elements so width won't apply, they will automatically resize depending on content. If you change the display to block then you can control the elements width and height and should see the image. You might want to also float them so if you have the comments link and read more link they will be displayed side by side. Add the following to your style sheet:
.comments-link, .readmore-link {
display: block;
float: left;
}