How work with degree or start and stop in linear-gradient CSS3
Tags: css3
Problem :
I'm trying to duplicate this button in CSS3:
this is mu CSS code:
#banneroverlaping > a:link, #banneroverlaping > a:visited{
color: white;
padding: 5px 5px 5px 5px;
background: #FA733B;
background: -moz-linear-gradient(-45deg, #FA733B 0%, #FA733B 50%, #FF501C 51%, #FF501C 100%);
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#FA733B), color-stop(50%,#FA733B), color-stop(51%,#FF501C), color-stop(100%,#FF501C));
background: -webkit-linear-gradient(-45deg, #FA733B 0%, #FA733B 50%,#FF501C 51%,#FF501C 100%);
background: -o-linear-gradient(-45deg, #FA733B 0%, #FA733B 50%,#FF501C 51%,#FF501C 100%);
background: -ms-linear-gradient(-45deg, #FA733B 0%, #FA733B 50%,#FF501C 51%,#FF501C 100%);
background: linear-gradient(135deg, #FA733B 0%, #FA733B 50%,#FF501C 51%,#FF501C 100%);
}
so I get this:
as you can see the cut between the two colors doesn't start at the corners but rather in the center. So my question is how may I code it to duplicate the original image???
thanks in advance
I base my code using this site
Solution :
I create a white right triangle with the same height and width of the button, alpha level of 70% and place it as background image
background: url(file:///home/juanpa/Public/a/img/Ontario.png) left no-repeat;
that's all :-)
CSS Howto..
To answer your first question, simply include the css (or a reference to it), in the html source generated by your XSLT. I do this all the time. Second question-...
This is possible using just CSS with the :hover pseudo-selector for the parent div, and also adding a class when you click on it (for tablets). For a quick example,...
I'm not sure on the accuracy of Browser Labs, I've tested your site in Firefox 4 and mine is fine, so I think you could probably ignore that one The...
First, terminology. The part before a set of curly braces is called a selector. There can be multiple selectors separated by commas. In a selector, you can use #name to...
if i understood correctly , you want something like this ? see snippet below or fiddle here > jsfiddle first i made the columns equal in height, because by default...
Assuming the browsers you're targetting (FF4+, IE9+, Safari 4.1+ Chrome 3+) can use the background-size CSS property, then you can do this in CSS alone: .bg { background-image: url(http://i.stack.imgur.com/HQaif.jpg); background-repeat:...
One of those javascript is adding that <span>... Try to guess who is or do this dirty trick: hide it with css .ui-select span { display: none; } ...
I guess that's what you want? body { width: 100vw; height: 100vh; margin: 0px; } .heading { position: relative; width: 100%; height: 20%; background-color: green; font-size: 0px; } .menu_button_container {...
You are looking for Single Page Applications (SPA). The page does not reload at any point in the process, nor does control transfer to another page, although the location hash...
This should do: .gwt-DatePicker .gwt-ListBox { font-size: 200%; } Works if I apply it to the GWT Showcase: ...
this should work and it doesn't need jquery. var used = []; var elements = null; //get all elements if (typeof document.getElementsByTagName != 'undefined') { elements = document.getElementsByTagName('*'); } if...
The reason you are not seeing it wrap in IE9 is because your original code http://jsfiddle.net/VdBGe/ automatically drops into compatibility mode. If you un-check it and put it back to...
Just set the pretty option to false when compiling. From Jade API documentation: pretty: boolean | string Adds whitespace to the resulting html to make it easier for a human...
When multiple images are added as background to an element, CSS would by default place them all in the same starting point. So, they will overlap one another. The background-position...
Try this instead: a.btnlink { border: 2px solid #808080; display: inline-block; height: 54px; /* height & line-height values match */ line-height: 54px; /* causing vertical centering (for one-line string) */...
Take a look at ~/AppStart/BundleConfig.cs: bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/bootstrap.css", "~/Content/site.css")); This means that Web Optimization will search for files bootstrap.css and site.css as it is or with .min suffix. So if...
Depending on where you want the Brand link to appear, here are two possiblities http://jsfiddle.net/panchroma/cW9sA/ or http://jsfiddle.net/panchroma/GWMnF/ EDIT: A third variation where the iPolice brand link is always centered, even...
So... here's the CSS3 / HTML5-way to do this. This won't work in IE though: it will fall back on the regular, immediate way (so it does work, it just...
I'm not entirely sure what you're asking for here, the header and footer are working fine width-wise for me. As for height, are you trying to get the footer to...
I made these two files that cover all: <!DOCTYPE html> <html> <head runat="server"> <title>Deep East Music</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <style type="text/css"> .buttons { float:left;...
You can separate multiple selectors with a comma: .ui-button.ui-state-hover .ui-icon.line, .ui-button.ui-state-active .ui-icon.line { background-image: url("/static/16x16/line-color.gif"); } ...
FIDDLE HTML: <div id="content"> <div id="news"> </div> <div id="hero"> <div id="heroText"> </div> <div id="heroImage"> </div> </div> </div> CSS: #content { margin: 0px auto; max-width: 1150px; padding-bottom: 50px; padding-left: 50px; padding-right:...
One way to align text vertically next to an image is to: .navbar-right{ position: absolute; bottom: 0; right: 0; } Regardless of the elements around it, this makes the menu...
Use this #id1, #id2, #id3, #id4{ float:left; } #id1{ width:50%; height:300px; background-color:red; } #id2{ width:50%; height:50px; background-color:blue; } #id3{ width:25%; height:250px; background-color:green; } #id4{ width:25%; height:250px; background-color:yellow; } demo at...
I implemented it like: window.onscroll = function () { // Get the amount of scrolling. var top = window.pageXOffset ? window.pageXOffset : document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop; // The menu...
Use the extract text plugin. Put this in your loaders: { test: /\.scss$/, loader: ExtractTextPlugin.extract("css!sass") } ...and in your plugins: plugins: [ new ExtractTextPlugin("styles.css") ] Adapted from... http://webpack.github.io/docs/stylesheets.html#separate-css-bundle...
You could use a background colour/image on the UL, and make the UL and LIs the same height to give this effect
Presumably you want to wipe out css on only the elements that are "yours". You can do this by applying a style that applies to elements of a particular class...
Hey thanks all for all of your answers but finally I got the solution. It was damn easy... My markup was like this <div class="styled-offer"> <select style="font-size:13px;" class="select offer-select" name="type">...
Explanation Bootstrap's adds position: absolute to the .dropdown-menu class. As you may know, all absolutely positioned elements are positioned in relation to the first parent element they find with position:...