css

Resize header and footer width on window resize

I've coded myself into a corner or I am overseeing something obvious here. I have a semi-fluid CSS layout that is designed like this: header - 100% width at all times, contains a x-repeated background image container - fluid (960px to 1200px, centered, contains two columns) footer - 100% width at all times, contains a x-repeated backg...

Make outer div be automaticly the same height as its floating content.

I want the outer div, which is black to wrap its divs floating within it. How can this be be done? I dont want to use "style='height: 200px' in the div with the 'outerdiv' id as I want it to be automatically the height of its content (eg, the floating divs). <div id='outerdiv' style='border: 1px solid black;background-color: black;'> <d...

Resize image and add an overlay image without using tables and without losing style in xml

I am building a system to create a "fake video embed" with thumbnails and play buttons over them. The images are coming from a service at a standard size, so have no choice but to resize them in HTML. Another restriction is, the codeblock has to be self-contained (like an embed code) and not reliant on any external stylesheets. I'm overl...

How do I use CSS with a ruby on rails application?

How do I use CSS with RoR? When I link externally, I'm never able to see the files. I cp'd the .css file to every folder I could think of...views, controller, template, and nothing seems to work. What do I need to do to enable external CSS files with a rails application? I'm new to rails, so forgive me if this is basic. Solution: P...

How would I style the text following a :checked radio button?

I've tried the following: :checked + * { font-weight: bold; } With the following html: <p><input type = "radio" name = "blah" />some text</p> How would I go about styling such text? Solution: Throw label tags around the text, and select with :selected + * It works in opera and ff3, so I'm good. ...

How to apply inline and/or external CSS loaded dynamically with jQuery

I have an Ajax control that is loaded into a Yahoo popup using jQuery. I just use a simple .get request to load the HTML. $.get(contentUrl, null, function(response) { $('#dialog').find('.bd').assertOne().html(response); }, "waitDlg"); Now the problem is that the content that is loaded needs its own CSS which is actual...

Weird div border problems when floating

Could I please get a explanation of why this code produces the result it does? And a way to fix it/work around it, if possible. I dont want div 'z' and 'q' to go over 'the blue div border' on the right. Or I would like div 'x' to be consitant with 'z' and 'q' and also go over the blue right border as well. Please view result <div s...

Suggest me a CSS-reset & base framework

Hi there, I will not asking CSS framework such as Blueprint or 960, lately i began to think that YUI CSS reset & base was too much bloated, so i need a simpler, efficient (in size) and effective CSS reset (and it's base) that support multiple browser or at least IE6-8 (Trident), Opera(Presto), Firefox(Gecko), Webkit Remember i don't as...

Link problem on IE6 and IE7

Hi, I'm having a hard time with ie6 lately on a particular problem, here's the bit of html I'm on : <a href="http://www.mylink.com" style="display:block;width:200px;height:200px;"> <span style="display:block;width:100px;height:100px;"> <img src="img.jpg" alt="My image" /> </span> </a> Everything is fine with firefox etc, b...

Splitting requests across domains—thwarting overzealous security

Following on Steve (YSlow) Souder's evangelism, my site (LibraryThing.com) splits requests across domains to facilitate parallel loading. We do CSS, JS and images; you can also do Flash, etc. We also use Google's version of Prototype, which is cross-domain, not just cross-subdomain. This is all great for speed, but for a small percent o...

CSS: semi-transparent background, but not text

Is there a way in CSS to make the background of an element semi-transparent, but still have the text of the element non-transparent? (Without separating the text and background in two elements positioned over eachother.) I've tried <p style="position:absolute;background-color:green;filter:alpha(opacity=60);opacity:.6;"><span style="colo...

Fixed divs and inside of iframe elements

Hi All, I have a problem with html code. I have tried many solutions but i haven't solved my problem. Excatly my problem is ; if i used two div inside of html page and both divs must be contains iframe element, i have never seen correct html page in browser. Note : each div must have position:fixed css attribute. Example code : <...

how to get body height using Jquery?

Here the total height of all DIV'S are 900px, but the jqurey function returns the height of the body as 577px.(if i removed body css, its working). can any body have solution for this problem? $j(function(){ alert($j("body").height()); }) html,body{ height:100%; } <div style="height:200px">header</div> <div style="height:500px">co...

CSS style for an element that has class A and class B

I need to style an element that has both class "a" and class "b". How do I do it? The order the classes appear in the html might vary. <style> div.a ? div.b{ color:#f00; } </style> <div class="a">text not red</div> <div class="b">text not red</div> <div class="a b">red text</div> <div class="b a">red text</div> ...

How to resize table columns width from JavaScript

Hello, I have a problem with javascript. I have a list of table cells stored at TabList. I want to find the maximum width, and then set this width to all of them. A sample code is here, but the setting of the width is not working. var MaxTabWidth = 0; for (var i = 0; i < TabList.length-1; i++) { if (TabList[i].offsetWidth>MaxTabWidt...

Dynamic Data Grid

My project is re engineering a an HTML data grid constructing using SQL query generated XML and XSL into an HTML table. The content of the table is not known at deployment as the SQL used to build the XML data is generated by the application at runtime. Given the distaste for tables in the CSS world I am hoping someone has a better sug...

w3c html checker on localhost

hi i was wondering if their is a program out there that checks to see if i have a beggining an end tag for each html markup item. i use dreamweaver cs3 and when something is wrong with the markup a tag changes color but its not alway acurate. i was wondering if there was someway i can have the beginning and end tags put into a tree view...

Jquery fade background on hover?

There is a link, with no background, and a css rule, which changes background on hover. Parent bg is white, link on hover - blue. How can I do a hover effect slowly, from white to blue? Thanks. li a {} li a:hover { background: blue; } ...

asp.net continuous string wrap

Okay, so it seems, for some reason (I might be doing it wrong, obviously), that I have some problem wrapping continuous lines, using Asp.net. Let's say I have 800 pixels worth of the "m" character, well, my table cell gets extended to that length. I don't want that, I want the cell to automatically break the continuous line after 300px....

Jquery fade <IMAGE background> on hover?

There is a link, with no background, and a css rule, which changes background on hover. Parent bg is white, link on hover - .png background image. How can I do a hover effect slowly, from white to my background image? Thanks. li a {} li a:hover { background: url(image.png) 0 0 no-repeat; } ...