css

Why write <script type="text/javascript"> when the mime type is set by the server?

My understanding is that mime types are set by the web server. Why do we add the type="text/javascript or type="text/css" attribute? Isn't this a useless and ignored attribute? ...

How to copy the shipping address to billing address

Hi all I like to know if I can copy the shipping address to billing address. When a user clicks same as shipping address checkbox. The shipping address value will be copied to billing input field. I got most of the parts done but I am not sure how to copy select menu (states) value to billing address. I really appreciate any helps. M...

How to center list tags inside an unordered list?

How can list tags that are given a display:block and are floated left, be centered inside an unordered list. The HTML: <div id="navigation"> <ul> <li>Home</li> <li>About Us</li> <li>Contact</li> <li>News</li> <li>Events</li> ...

"0.8em" to ".8em" , is both same?

"0.8em" to ".8em" , is both same? which should we use? ...

is there any css validator with CSS3 and vendor specific extensions support?

is there any css validator with CSS3 and vendor specific extensions support? I only want to see problem other than CSS 3 and vendor specific extensions related errors. And is there any better xhtml css validator than W3C's? ...

How to show hidden divs on mouseover?

How to simply show a set of hidden divs on mouseover. so if #div1 #div2 #div3 all need to be shown on mouseover, how to I do this? ...

How to create 'greater than' arrow using CSS only?

Is it possible to make these arrows with CSS and with all browser compatible including IE,6,7,8 or image is the only option? Home > Products > Digital camera ...

Is using css class always a better idea to get rid of style overriding problems?

Is using css .class in place of #id always a better idea to get rid of style overriding problems and iimportant? #content ul li a {font-size:10px} #content .demo ul li a {font-size:15px} ...

$(window).load(function(){}); problem in Opera

Hello. I need to recalculate body's main div height, than wait while all content (images) loads and only than show it to site visitor. To achieve this i used jQuery and CSS //CSS looks like body {display: none;} /* div block height calculator */ function recalculateHeight(id, add){ var height = $(id).height(); if (height < 650) hei...

Floating inner div in parent

Hello, I have two divs: <div id="modalBox" style="position: absolute; border: 1px solid #bababa; width: 400px; height: 180px; background-color: #e3e6ca; text-align: center; -moz-border-radius: 6px; -webkit-border-radius: 6px; display: none;"> <div style="background-color: #98002f; backg...

Get a CSS value from external style sheet with Javascript/jQuery

Is it possible to get a value from the external CSS of a page if the element that the style refers to has not been generated yet? (the element is to be generated dynamically). The jQuery method I've seen is $('element').css('property');, but this relies on element being on the page. Is there a way of finding out what the property is set...

ASP.NET CSS file in master page

Hi All, In my application I have next problem. I created master page and some content pages, some of which are located in the nested folders. In the master page I added the link to .css file <link href="default.css" rel="stylesheet" type="text/css" /> But pages are located in the nested folders can't use this .css file. How can I f...

Can I use XPath to filter elements by CSS properties?

Or do I have to do something like this: var nodes = document.childNodes; for (var i in nodes) { if (window.getComputedStyle(nodes[i], null).getPropertyValue('someproperty') == 'somevalue') // do stuff } Edit: I'm not very familiar with XPath. A 'simple' stab at the problem would be something like this: function test() { ...

place element at the bottom of page and prevent from scrolling using css

I want to place this div at the bottom of the screen, and it should stay at the bottom even when there is a scroll. But now it moves when I scroll: <div style="color:#FFF; position:absolute; bottom:0px;"> <?php $time_taken=round(getmicrotime()-$time_start,4); echo"Generated in ".$time_taken." seconds"; ?> </div> ...

How to append() an element and set its style with css() at the same time with jQuery

I tried: $('#canvas').append('<div class="tile"></div>').css({left: leftPos, top: topPos});, but that sets the style of #canvas rather than the appended element. I then tried: $('#canvas').append(('<div class="tile"></div>').css({left: leftPos, top: topPos}));, but that gives the error "Object <div class="tile"></div> has no method 'css...

Defining a class with specific style dynamically in jQuery

Is it possible to define a class with specific style attributes dynamically with jQuery, rather than setting the style of all elements with that class? I could set the attributes of the class at the end of the script once all the elements have been created, but is that the best way to go about it? If I define the style of the class with...

Odd problem with IE8 and z-index CSS property

I not been able to put one DIV over his parent DIV in Internet Explorer. With Firefox is working as suposed to. The odd part is that if I open the html file directly in IE, everything works fine. But if I upload to the server and open from there, the div is hidden underneath his parent. I've tried several z-index combinations and none ...

Text not Being Placed Correctly In the Center

This is another noobish mistake from me but I've placed some text in my page but after adding some padding to my div tag it's impossible for me to place my Text in the vertical center. Here is a preview of my problem: The CSS: body { background-image: url(../images/body-bg.jpg); font-family: arial; } .cms-head { backgrou...

Load DOM before css?

My jQuery code sets the height of an element to 0px as soon as the page loads, then animates it to 500px. In my CSS, this element is already set to 500px (in case anyone has javascript turned off). I tried 'DEFER' on the tag where I link to the stylesheet so that the CSS loads in last of all, but that causes a blank white page to show ...

is it possible to override a css class

i have the following jquery code to format a html table. $(".jtable td").each(function() { $(this).addClass("ui-widget-content"); }); i want (one on table) to change the text color to blue (its black in the ui-widget-content class. i tried doing this below but it didn't seem to do anything. Any help on override some par...