How to style this with css? [closed]
Tags: html,css,html5,css3,web
Problem :
Wondering what is the best way to style this with css? I know float
could make it happen but I don't think it is a good idea.
Love Love is a variety of different feelings,
states, and attitudes that ranges from
interpersonal affection to pleasure.
Day A day is a unit of time. In common
usage, it is an interval equal to 24
hours.
.
<li>
<span>Love</span>
<span>Love is a variety of different feelings, states, and attitudes that ranges from interpersonal affection to pleasure.</span>
</li>
<li>
<span>Day</span>
<span>A day is a unit of time. In common usage, it is an interval equal to 24 hours.</span>
</li>
Solution :
By using the wonderous display:table-*
options:
li {
display:table-row;
}
li > span {
display:table-cell;
padding:3px;
}
And gives this:
CSS Howto..
jQuery UI supplies a neat callback for when it's done creating the element. That's where you'd want to do the color change. $( ".selector" ).button({ create: function(event, ui) { $('.selector').css({'background-color':...
If your text is static, you can use <div> Also chickens, turkeys, pigs, a fig, an apple, and a couple of citrus trees on our farm.<br> <br> </div> OR This...
Before a rails app is deployed to production mode, all of your assets (css, javascripts and images) are usually precompiled and placed in the public directory, which is where your...
Create a new module and put it in: /sites/all/modules/custom The module structure and files would look like this: ahelper/ ahelper/css/article_node.css ahelper/js/article_node.js ahelper/ahelper.info ahelper/ahelper.module ahelper/ahelper.info core = "7.x" name = "Article...
Here's a method using CSS's box-shadow, which is compatible in Firefox 3.5+, Safari 3+, Chrome, Opera 10.5+ and IE9+. http://jsbin.com/usabe4 Multiple box-shadows are being used to get closer to the...
I've not seen this style of grid position before. What so ever. Do this: .span3 { vertical-align: top; } ...
Give position: relative to parent of the sub menu. The sub menu is given position:absolute and hence shows up outside. .menu_nav ul li { position: relative; } ...
Give float:leftto the image the text should automatically get to the right side.
I haven't seen a need to in ages (like Safari 2). Make a new question about the actual problem you're having and someone can probably tell you how to fix...
Add the CSS vertical-align: top; to your navbarright a, where you also have display: inline-block. Here's a working JSFiddle. display: inline-block keeps everything in a tight block, when one div...
Adam Luter gave me the idea for this, but it actually turned out to be really simple: img { width: 75px; height: auto; } IE6 now scales the image fine...
Further to Rusher's answer, animate should work. Here's a jsfiddle CSS: #movingImage { margin-left:100%; width:100px; height:50px; background:#ff0000; } HTML: <body> <div id="movingImage"></div> <a href="#" id="clickMe">Make it Move!</a> </body> JS: $('#clickMe').click(function(){...
Hi in this particular menu you can do this : One remove the class nav-justified this removes the responsive styles. Two make your container with your fixed width. .container {...
function isEmpty (el) { if (!el.hasChildNodes()) return true; for (var node = el.firstChild; node = node.nextSibling;) { var type = node.nodeType; if (type === 1 && !isEmpty(node) || // another...
As it is fixed it will not react to the parent div. So to fix it make the wrapper fixed instead that way you can center it and your content...
EDIT I think I figured out what you're trying to do now. You do need to move the transition property onto the on and off classes as I'd suggested earlier:...
When importing CSS stylesheets by <h:outputStyleSheet>, the stylesheet is imported and processed by the FacesServlet through /javax.faces.resource/*. Look at the generated <link> element pointing to the stylesheet in question and...
Try using a mixin. Here's an example from the Mixin section: @mixin border-radius($radius) { -webkit-border-radius: $radius; -moz-border-radius: $radius; -ms-border-radius: $radius; border-radius: $radius; } You can use this like so: h5...
labels are by default inline. They will not respond on top/bottom margin. You have to tell them to display as block/inline-block . Like this label { display: inline-block; margin: 20px...
You should make it relative: bundles/dimiyvm/css/* There properbly is not bundles directory in the root of your website, it's in web/bundles.
You need to use background-size:coverbut propely. That means give 100% height to your .content(and add it to all the parents including html) basically: html, section {height:100%;} body { width: 100%;...
A pseudo-element is ideal here which can be styled in any fashion you want, color, width & height...even position below the link text. a { position: relative; text-decoration: none; }...
Just remove bottom: 0; and you already got the solution. .container { position: relative; height: 200px; width: 200px; } .container:after { position: absolute; content: 'Center me!'; top: 50%; right: 0;...
shift a particular target word to the best horizontal center that words will allow You can achieve a rough centering using quite simple JavaScript. All it does is scan along...
add clear both .image-block { height:300px; background-color:black; clear:both; } ...
The h2 is forcing the button to move down because it forces a line break, just rearrange the order like this: <div style="" class="header"> <button style="position:absolute;left:5px">left</button> <button style="position:absolute;right:5px">right</button> <h2...
You only need to add some margin-left to the try-class: http://jsfiddle.net/VWY8N/ .try { display: block; margin-right: 150px; margin-bottom: 50px; margin-left: 201px; } ...
There's an HTML tag in line 5 of your CSS file : <a class="btn-alt"></a> I don't know if it's a typo in the actual code or the result of you...
Use display: table for parent and table-cell for child and alter your css as following: a.button { background-color: green; padding: 5px 10px; color: #ffffff; cursor: pointer; position: relative; display: table;...
Add the :after to the label. .required-field .control-label-nobold:after { content: "*"; font-weight: bold; color: red; } Update: Sorry, missed the .required-field class....