css

The difference between the child and the decendent selector

These appear to do the same things. I've never been sure what the difference is. <style> #a > b > i{ color: blue; } #b b i{ color: red; } </style> <div id="a"> <b><i>text</i></b> </div> <div id="b"> <b><i>text</i></b> </div> ...

HTML5 Video poster attribute in Safari and Chrome

In Firefox the image specified by the poster attribute of the VIDEO tag remains on screen until the play button is pressed. However in the Webkit browsers (Safari and Chrome) the poster is dumped in favor of the first frame from the video as soon as the video metadata is fetched. I want to avoid having to place the poster on top of the ...

In Internet Explorer, input fields are a few pixels longer than select boxes; how can I make them the same length?

Given the following code: <form> <input type="text"> <select> <option>Foobar</option> </select> </form> With the following CSS: input, select { width: 200px; } Internet Explorer displays the text input slightly larger than the select box. Is there a way (that hopefully doesn't break compatibility with other browsers) t...

Detect and remove Inputbox overflow.

I have a input box with the attribute overflow:hidden; I have also used javascript to stopped text being entered so that it cant overflow however I would like to be able to remove any overflow if the user manages to insert text into an already full textbox. Is there anyway in javascript to detect when a texbox has hidden overflow?...

CSS Positioning/Height Extending Full Page

Hey guys, I'm having some trouble with my css position. Basically I have a sidebar that is set to the left of the screen, which basically includes all my links for navigation. I want the sidebar to extend all the way to the bottom of the screen, no matter if the user minimizes or maximizes the browser, or their resolution. Even if the pa...

Modified asp button: how to prevent any change on click?

I am modifying a button and I can't figure out how to prevent it from changing (the text moves a bit) when clicked. Any suggestions? ...

Whats the best approach to making a web application for drawing on and modifying an image?

Whats the best approach to making a web application for drawing on and modifying an image? Should be able to draw on, add text etc. I have been hearing a lot about SVG, but is that a required download for the user to view the application then? Whats the best way to handle this? What language? etc. Thanks! Preferred: PHP jQuery java...

Why CSS making links non-clickable in Firefox?

I'm checking in Firefox 3.6 Why 2nd level links are not clickable in this tab menu. live example here : http://jsbin.com/upeka4/5 these are clickable if disable the css ...

Internet Explorer 7 li link hover bug

Internet Explorer 7 only; FireFox, IE 8, Chrome works fine. My left menu http://box1.thegiant.ca/~cuisirama/index.php If you hover any link the brackground becomes transparent how can i fix this? Here is my CSS: div.moduletable_mg { border-top: 1px solid #9C907D; padding: 0px; margin: 0px; } div.moduletable_mg ul { padding: 15p...

Sticky footer issues in IE - using wordpress

I've modified a wordpress template so that, among other things, it has a sticky footer that gets pushed down when the screen fills with content. Everything is working beautifully in non-IE browsers, but something's horribly wrong in IE. The footer's sticky, alright, but doesn't push down. Bonus points: The header, In IE, also appears ...

What does .class-name mean as a CSS selector?

So if I have a CSS class named "class-name", what does the following mean? .class-name { margin: 0; } And why, if I had the following HTML <div id="some-id"> <ul> <li class="class-name"> ... would the selector #some-id .class-name ul li not exist? ...

Can I shrink this jquery script down?

Hello, I was wondering if someone can help me shrink this jquery script down a bit? Right now, I have the ID on hover, but that can be changed to a class if need be. I'm sure there must be some way of doing it with "this" instead of having to list each and every one down. Below is an example with 2 of 11 different functions. I'm hopin...

CSS Nested Div Print Problem: Text bunches at top of second page

Here's the HTML and inline CSS I'm using currently: <div style="width: 975px; clear: both; float: left; text-align: left; margin: 0; background-color: #D3D3D3;"> <div style="width: 384px; float: left; height: 20px; margin: 0;"> <span style="font-style: italic; font-size: 13px; padding-left: 80px;">Test Group 1</span></di...

Sanitize user defined CSS in PHP

I want to allow users to use their own stylesheets for thei profiles on my forum, but I'm afraid of possible security vulnerabilities. Does anyone have any tips for sanitizing CSS? Basic process: User enters CSS into form -> Save to DB -> Output as inline CSS ...

how do I prevent other elements from being affected by overflow hidden?

I have a parent element that has dynamic text in it that needs to be confined into a certain area. I had users that where writing sentences without using spaces (example:yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy etc...) This was breaking the structure of my styled text area. #ProfileCommentBody{ width:500px; font-family:Arial, He...

Image scaling geometry

This is very programming related but a somewhat non-programming question. I am performing image scaling in a web based application and I need to maintain my image relative to a fixed location even though it scales anchored by its top, left corner. Hope the graphic make this possible. The idea is that C is a fixed location that I want t...

Overriding css with jquery/javascript

I have a table whose border is set as 1px solid silver from an external style sheet(some .css file). I have no control over this file. This is the css: my_table tbody td { font: 8.5pt verdana, sans-serif; border-top: solid 1px silver; border-bottom: solid 1px silver; overflow: hidden; padding: 0px 3px 0px 2px; } Now I want to change ...

How can I create CSS sprites from images stored in the database?

I have an ASHX handler that I am using to display images that are stored in a database. I display the images as thumbnails and then full size if the user mouses over them. How can I combine the images at runtime to produce CSS sprites for use in this situation? If it can be done does anyone have suggestions on where to start? UPATE...

Does jQuery actually use camelcaps to reference multiword css fields?

In jQuery, are multiword css fields condensed to camelCaps? For instance. $("#item").css("marginBottom"); not $("#item").css("margin-bottom"); On my machine running Firefox 3.6.6 with jQuery JavaScript Library v1.4.2, the answer seems to be no. doing $("#item").css("marginBottom"); gives me a warning about invalid css field and ...

how properly achieve height 100%

How to achieve webpage's content container fluently resize, without specifying height=100% or height=auto ? As some of you know it occasionally works properly this way :/ Just like here : http://net.tutsplus.com/ , designshack.co.uk or on facebook ? On both designshack and nettuts I'm not even able to break up the layout. ...