UIButton set border of specific sides - objective-c

Is there a way to set a UIButton's border widths to different values, similar to CSS like border-width: 0 1px 0 0 or border-right-width: 1px?

Not with a standard UIButton, no. You'll have to use a custom button and create images that match your desired design.

No, it's not possible using APIs

Related

HTML Table fill to edge of screen

What I am trying to do is get the grey boxes on this to go to the edge of the page, I have found a similar article here but when I have tried changing the margin and padding to 0 nothing is happening, this table is created in a cms that has been coded by previous developers and I have no idea why I can't get these grey areas to automatically fill the edge of any size screen.
Any help on where I am going wrong would be grateful as I am re-developing this website and need it done ASAP
you will have to remove the width of the wrapper to auto
then add to your content2 div something like: padding: 0 200px; for the gray only
Your #wrapper style is set to width: 970px. Change that to width: auto and you're good to go.
if you are talking about the box shown in blue below
is because the table is been redered inside the <div id="wrapper">
if you change the width: of the DIV to auto.... your boxes will go all the way to the edge as shown on the other image
after changing the width to auto of the wrapper div looks like:

PyQt Scaling background image using styleSheet ? or any other way?

I'm trying to resize a background image on a button
btn.setStyleSheet("background-image: url(:/AddButton.png);"
"background-repeat: no-repeat;");
tried it with
background-size: 10px auto;
but pyqt seems to be missing this CSS attribute
Is there any other way of scaling the background image on the button?
I need the background image as the icon on the button will be used on top.
any suggestions?
I believe you need to use border-image. Since the border-image property provides an alternate background, it is not required to specify a background-image when border-image is specified. In the case when both of them are specified, the border-image draws over the background-image.

Placing an image from the sprite in the specific position

Let's say i have a sprite with lots of icons. I want to place one of the icons in the specific position over the div, e.g. 15px from the right side and 20px from the top.
Previously, when i had single image file i used the following code:
background: white url(./imgs/some/icon.png) no-repeat 91% 47%;
Now then the image is in the sprite i can access it using
background-position: 0 -471px;
But as i see it there is no place to add my current 91% 47%. Is there some kind of workaround?
It's possible to use CSS3 in the project if it helps.
Thanks!
Would you be able to add another <div>, give it the correct background, and absolute position it where it needs to be? I'm thinking that your background-position percentages are probably out when you use a sprite sheet.
If I understand your set of constraints correctly, you might be able to pull it off with a single div, but only if your png has a transparent background and the icon has enough "transparent space" as to not reveal any other icons.
Try:
background: white url(./imgs/some/icon.png) 91% 47% no-repeat, transparent url(./imgs/some/icon.png) 0 -471px no-repeat;

In Xul, how to get rid of the popup's background color and make it transparent?

To make a window transparent, I just don't use the "window" tag. I use a "myWindow" tag, so it don't show the default window background.
But how do I do with a popup dialog?
To make an element transparent, setting background-color: transparent; and/or -moz-appearance: none; normally suffices, it's not necessary to fiddle around with non-standard tag names.

Webkit border radius sometimes take effect

This issue is about the CSS3 border-radius property (http://www.css3.info/border-radius-apple-vs-mozilla/)
An example of this problem is here:
http://jamtodaycdn.appspot.com/bin/rounded.html
In this URL, I have rounded divs that appear to be rounded in FF3, but on Safari and Chrome the rounded corners are not there.
The style is as follows:
-moz-border-radius-bottomleft:2px;
-moz-border-radius-bottomright:92px;
-moz-border-radius-topleft:92px;
-moz-border-radius-topright:2px;
-webkit-border-bottom-left-radius: 2px;
-webkit-border-bottom-right-radius: 92px;
-webkit-border-top-left-radius: 92px;
-webkit-border-top-right-radius: 2px;
I'm fairly sure that this CSS is formatted correctly, so I'm clueless as to what the problem is.
The problem appears to be in the 92px radia. It looks like the maximum radius that the 20-pixel-high div can handle is 18px. It's not necessarily obvious what a 92 pixel radius means in that case. However, you can specify both an X and Y radius using something like this:
-webkit-border-bottom-right-radius: 92px 18px;
(side note, you shouldn't use the same ID for multiple HTML elements. You should use class instead, and adjust your CSS selector so it says .round instead of #round.)
For anyone referring to this for help with rounded corners, I agree with Jacob's answer regarding Webkit, but the question also mentioned Chrome not working. Chrome uses standard CSS3 rounded corners which are exactly like Webkit's, but without the preceding '-webkit-' on the rule. These are as follows:
border-bottom-right-radius:2px;
To take into account Firefox, Webkit and Chrome, you'd need to do something like this:
-moz-border-radius-topright:3px;
-moz-border-radius-bottomright:3px;
-webkit-border-top-right-radius:3px;
-webkit-border-bottom-right-radius:3px;
border-top-right-radius:3px;
border-bottom-right-radius:3px;
The third set of rules are CSS3 rules and are supported by Chrome. This is a good way to also get rounded corners in IE using something like CSS3Pie: http://css3pie.com/
Don't you need to apply a border or border-width property as well as the various border-radius properties?
Also, I've noticed Safari dropping the radius above certain radius values - try reducing the pixel values & see what happens.
simple type just use:
border-radius:92px 92px 2px 2px;
where:
border-radius:top right bottom left;