Skip to main content

Posts

Showing posts with the label css

Fixed positioning in Mobile Safari

Is it possible to position an element fixed relative to the viewport in Mobile Safari? As many have noted, position: fixed doesn't work, but Gmail just came out with a solution that almost is what I want – see the floating menu bar on the message view.

Progress Bar Filling - jQuery Implementation

I'm implementing my own Progress Bar using jQuery. My question is how can I fill (for example) only 30% of it with a background ? What are my options ? Basically, the Progress Bar is a simple div with rounded corners (-moz-border-radius). I'm using Firefox 3.6.3.

Is it possible to change text color based on background color using css?

Is it possible to change text color based on background color using css?

Most elegant way to force a TEXTAREA element to line-wrap, *regardless* of whitespace

Html Textarea elements only wrap when they reach a space or tab character. This is fine, until the user types a looooooooooooooooooooooong enough word. I'm looking for a way to strictly enforce line breaks (eg.: even if it results in "loooooooooooo \n ooooooooooong").

How to print on already printed paper from a webpage?

i have already printed pages of A4 size in printer image is attached! now i want to print data in blank fields from webpage any one guide me how to achieve this?

Exclusive CSS for iPhone/Android

I'm making a mobile-friendly stylesheet for a page of mine. Is there a simple way to make it show that stylesheet to iPhone/Android users? Or do I have to pull the user-agents and figure it out that way - and how do I do that?

Showing a demo of my CSS on any website

I have developed a small component which can be put in to any website. Now, I want to develop a code that could demonstrate how would my component look like on any website. So, the person would come to my page and put in his URL and then my code should embed my custom JS/CSS in to the downloaded HTML and display it. Something like this . Here, like the feedback tab, I want to show my component any where on that page. Source: Tips4all

I want to show list items as 2 or more columns (dynamic alignment)

I am able to do the list using float:left; like this But I would like to show it like this (as 2 or more columns) How can I do that? @sandeep gave good solution. Unfortunately does not work in IE(need ie7 and above). any help? Source: Tips4all

How can I tell if a particular CSS property is inherited with jQuery?

This is a very simple question, so I'll keep it really brief: How can I tell if a particular DOM element's CSS property is inherited? Reason why I'm asking is because with jQuery 's css method it will return the computed style, which inherits the parent object's CSS properties. Is there a way to retrieve the properties set on the object itself? An example might explain what I'm getting at a bit better: CSS: div#container { color:#fff; } HTML: <div id="container"> Something that should be interesting <div class="black"> Some other thing that should be interesting </div> </div> So, in the instance of div.black , which inherits color , how can I tell if it is inherited? $('div.black:eq(0)').css('color') will obviously give me #fff , but I want to retrieve the style of the element itself , not its parents. EDIT : To clarify, my question is how can I detect if a given CS