css

Different ways to use browser and system media resources

Examples: <img src="system://media/icons/logo.png" alt="OS"> <style> img.browserIcon {background-image: url(browser://media/icons/logo.png); width: 16px; height: 16px;} </style> On Firefox you can access to some resources like this: <style> .button {background: transparent url(chrome://global/skin/button/startcap.png) no-repeat s...

How to keep a floating div centered on window resize (jQuery/CSS)

Is there a way (without binding to the window.resize event) to force a floating DIV to re-center itself when the browser window is resized? To help explain, I imagine the pseudocode would look something like: div.left = 50% - (div.width / 2) div.top = 50% - (div.height / 2) UPDATE My query having been answered below, I wanted to pos...

IE8, XHTML, position: fixed; and z-index.

I have an XHTML 1.0 transitional Doctype. I have a <div> that is position: fixed; bottom: 0px; left: 0px; width: 100%; z-index: 200;. Inside that <div> I have two buttons which are position relative, aligned right, with a set z-index of 201; In Firefox the bar at the bottom and the two buttons are correctly located at the bottom. In ...

jQuery selector: this.parent, is there such a thing?

I have a lot of div boxes with nested div .titles, with a button inside. Is there a way in jQuery to select the parent of the button? Something like: $("#button").click(function(){ $("this.parent").css({'border-bottom' : 'none'}); }); Or am I going to have to rename all of my title classes to unique classes? ...

Difference in display for jQuery created img tag and ASP.Net created img tag

My web page has two ways of displaying a particular content. 1. When the page is loaded, the items ( images with anchor tag) are generated using ASP Repeater. 2. When user perform some Ajax action, the images are returned as JSON and I use jQuery for creating the a & img tags. In both these methods, the anchor tags with images are dis...

Vertical scrollbars with window.open

I am opening a popop windows with window.open. I want the scrollbars to show up if needed. However in safari, the scrollbars are not showing up unless I set, scrollbars=1, However that makes even horizontal scrollbars show up. Is there a way to specify, "Show only horizontal scrollbars, if needed" to popop window. (Possibly via some c...

Style:Display and Visibility errors ?

< table border="1" cellpadding="0" cellspacing="0" width="100%"> < tr> < td>1< /td> < td>1< /td> < td>1< /td> < td>1< /td> < td>1< /td> </tr> < tr style="display:block "> < td>2< /td> < td>2< /td> < td>2< /td> < td>2< /td> < td>2< /td> </ ...

Fixing CSS positioning and scaling

I was contemplating writing a UI toolkit where setting the position and size of an element/widget was intuitive and powerful. Here are some examples of how it would be used (not currently implemented): ui("Panel").size(". 40").pos("0 0").attach(element); ui("Textarea").size(". %-10").pos("0 40").attach(element); ui("Panel").size(". 10")...

css name should be?

i am making style sheet for a website. css style name should be related to website or content? my website is about web development.is that right to use style name- #web-development-header .web-development-company-london-content or should use #header .content is css style name can help for seo? ...

Copy CSS from one class to another with JQuery?

Hi, I would like to make a timepicker similar to the datepicker, conforming to the current UI Theme. Can I copy, or somehow inherit, the CSS properties from datepicker to my timepicker? I do'nt want to copy the behaviour of the class, just the CSS props. (I've seen other timepickers out there, but I'm not really happy with any of them....

How switch off image border in IE

Its very strange... i write img{border: none} ... <img src="..." border="0" style="border: 0"/> But it still not working, and IE debugger show me image "border: medium". And my div's more and more fat(( For 10 px per image. Damn IE, it gonna make me crazy... ...

How to replicate PS multiply layer mode

Does anybody know of a good way to replicate Photoshop's multiply layer mode using either an image or CSS? I'm working on a project that has thumbnails that get a color overlay when you hover over them, but the designer used a layer set to multiply and I can't figure out how to produce it on the web. The best thing I've come up with is...

Image-mapping on an automatically resizing background with CSS

Hi there, I'm pretty new to CSS, I've pilfered a bit of code and made it work for me in the way I want, I've developed a bit of an understanding after trying so many different ways to do what I want but am a bit lost. I want to do exactly as the title says, image-map whilst allowing for the automatic resizing I'm trying to implement. Ob...

jQuery - How to add a class to a td tag

Hello Everyone, How would i go about adding a class to a td tag given the following table: <table> <tr> <td id="1"></td> <td id="2"></td> <td id="3"></td> </tr> </table> I would like to add the class to the td with the id of 2. The class name in my case is td_highlight. Have tried a few different scri...

How much time do PHP/Python/Ruby *programmers* spend on CSS?

Not sure about you guys, but I detest working in CSS. Not that it is a bad language/markup, don't get me wrong. I just hate spending hours figuring out how to get 5 pixels to show on every browser, and getting fonts to look like a PSD counterpart. So a question (or two) for programmers out there. How much time (%) do you spend on web...

Regex - Match text between 2 characters

I need a regex pattern(s) that will match on words before a colon and also values between 2 characters. Here's the example, I have a string: str='`width: 1070px; padding: 0px 10px 0px 10px; height: auto; margin:0px auto 0px auto;`' from a stylesheet, I need one array to store the property only (the text before a colon), (prptyArra...

Mimicking a HBox / VBox with CSS

I'm an old school tables guy, and am pretty baffled when it comes to modern HTML. I'm trying to something as simple as vertical / horizontal layouts (i.e. Flex's hbox/vbox), but am having major difficulty replicating them. An old table would look something like this for an HBox: <table width="100%" height="100"> <tr valign="middle...

fixing one div to second div top right corner with css

i have the following divs <div id="outer"><img src="myimgpath"><div id="name">Username</div></div> now i want to fix the inner div to the outer div's top right corner ...

How do you create an outfit creator like this?

http://www.tailorstore.co.uk/tailor-made-shirts I believe it's using a form but how does it assemble the different layers of images? Is it just css? ...

applying padding after using css reset

As it turns out I don't know CSS. I ran into a brick wall after using Eric Meyer's CSS reset (http://meyerweb.com/eric/tools/css/reset/) I have a table with this style table.home_right_top, .home_right_top table, .home_right_top { background-color: #F2F2F2; width: 100%; padding: 10px 20px 15px 20px; } but the padding is not applied...