css

what could be xpath or css for following snippet

click //div[15]/div/ul/li[5] In the snippet above, how can I write xpath or css selector based on known li item. Yes, I know li item ahead of time(such as @, +, * etc ) Also there is no guarantee that div[15] would be always div[15] it could be div[14] or div[17] etc ...

Why don't web fonts in Firefox work on a different domain?

I was experimenting with the fancy new OpenType font capability in Firefox 3.5 and I ran into a problem. I was trying to embed a font on a different domain than the page it would be used on, and it didn't work. I thought it may have been a bug, but from what I read on the MDC reference page, I noticed this note: In Gecko, web fonts a...

Nested Row problem

Hi, I'm using the 1kb css grid framework for a site, and although nested rows are apparently supported by the framework, when I try to drop in a nested row it doesn't work! Sorry not to explain it better - the site's here, may be easier to just look at the source: http://2605.co.uk/saf/build/ the grid: /grid.css the stylesheet: /styl...

making the div width stretch to fit its contents

Hi, I have the following html code: <table> <tr> <td> <div id="fixmywidth" style="position:relative; height:30px;"> <div style="z-index: 2000; margin-top: 5px; height: inherit; position: absolute;"> <table style="height:inherit"> <tr style="height:inherit"> <td align="center" style...

Change text fields background colour if negative number using Jquery/CSS

Hi, I have the following text input on a budget calculator form which displays the final balance... <tr><td align="right"><b>Balance: &pound;</b></td><td align="left"><input type="text" class="res" name="res" id="res" size="10" readonly="readonly"></td></tr> How do I go about setting the background of the input to red using css and j...

Underline ie6-bug. Inline element in <a> tag.

There is a markup: <a href="#"> lorem ipsum<span>15</span> </a> There are styles: a{ text-decoration: underline; } a span{ background: #fff; //To clean the bottom underlining under <span> } Works in all interesting me browsers. Except IE6. The bottom underlining under <span> remains. How to solve this problem withou...

Truncate text to fit table cell without wrapping using css or jquery

I want the text in one of the columns of a table to not wrap, but to just truncate so that it fits within the current size of the table cell. I don't want the table cell to change size, as I need the table to be exactly 100% the width of the container. This is because the table with 100% width is inside of a positioned div with overflow...

Setting height of div equal to containing div

i have the following simple script <div id="content"> <div id="left"> <div id="menu"> <ul> <li>menu</li> </ul> </div> <div id="left_ad"> </div> </div> <div id="middle"> some text here... </div> <div id="right"> <div id="right_ad"> <div id="ad2"> </div> </div> </...

Pure CSS Dropline Menu - second level menu items sit below their parent - but sometimes extend off screen and add horizontal scrollbar

Hi, I'm working on a pure css menu that consists of four levels Level 1 and 2 are a dropline menu in style Levels 3+ are dropdown menus When you hover over a level 1 menu item, the level 2 menu displays directly below menu item you are currently hovering over. However if there are lots of menu items on level 2 then the level 2 menu g...

Help with animating an element in jQuery

I have an unordered list with a few list elements. #tags { width: 300px; height: 300px; position: relative; border: 1px solid red; list-style: none none; } #tags li { position: absolute; background: gray; } I have also started writing a jQuery plugin to animate the list elements. So far, I place the li...

@font-face problem with font-weight in Safari

I just started using @font-face This is on top of my css @font-face { font-family: Avenir; src: url(../fonts/AvenirLTStd-Medium.otf); } body{ font-family:"Avenir",Helvetica; background:#fff url(../images/main_bg.png) repeat-x scroll 0 0; color:#321244; } and i have this below for a menu on joomla #menu_bottom ul li a { font-si...

CSS: Parent-Div does not grow with it's children (horizontal)

I would like the parent-div (red) to grow with the green child-div. Now it just stops at the viewport. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html lang="de" xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <title>simple document</title> <style type="tex...

Font size render in iphone

Hi everybody, i'm testing my website and is working fine on every browser, except for the iphone browser (i think it's safari mobile?) that renders a piece of text with a bigger font that the rest. I've checked the CSS by hands and using firebug on the page and i can confirm i've put the same size to all of them. How do i fix this? You ...

CSS3 - Validator - RGBA wrong?

I'm using the W3C CSS Validator with the Profile CSS3 but the validator says that my CSS rgba()'s are wrong. I looked up the Color Module Level 3, and the syntax is the same as mine. I also tried the Dev-Validator, same result. Example input: div.class { border: 1px solid rgba(0, 0, 0, 0.5); } Am I wrong or why does the validat...

css direction rtl element order problem

I have this html: <body style="direction: rtl"> <div style="display:inline-block"> <span>x:</span> <span>1</span>, <span>y:</span> <span>2</span> | <a>link1</a> | </div> <a>link2</a> </body> With direction: ltr it displays: x: 1, y: 2 | link1 | link2 But when I change it to rtl is shows: ...

How can I get IE8 to accept a css :before tag?

I have the following CSS code .editable:before { content: url(../images/icons/icon1.png); padding-right:5px; } this is used in conjuntion with the following markup: <span class="editable"></span> In every other blessed browser in the world my icon is appearing, but IE8 seems to have a problem with this. Isn't the :before ps...

Google Maps Info Box - Can it exist outside the map container?

I've got a Google map, standard fare really. It's quite small though and the popup info windows on the markers are quite big, so my question is, is it possible for these popup windows to spill out the edge of the map and on to the actual website? (See dodgy photoshop job for an example). Thanks! ...

Why align="center" not overriding on {text-align:right;}

Why <td align="center">5</td> not overriding on table.finTable tbody tr td {text-align:right;} ...

Tool to automate converting inline css to external css?

I am working on a site which is full of inline css. Is there a tool to automatically refactor the pages so that inline css is moved to an external css file? Preferably doing this in a smart way where it doesn't create duplicate css declarations so if I have two inline css like style="left-padding; 12px", it creates one css class instead ...

css overlapping content wanted

Unlike most questions about overlapping content seen here, I would actually like content to overlap! Here is my page. Try typing "USA Riverbrooke". Returned content pushes down the map. What css syntax can allow the returned content to slide down and overlap the map? http://tinyurl.com/ycblkkz ...