stylesheet

How to detect mouse moving while left button down

I want to use javascript to detect the mouse position once the mousedown event has fired. It appears I am not getting an onmousemove event when the left button is held down. The cursor is changing to some circle with a cross through it. My whole goal is to detect the start position of the cursor on mousedown and change the top left st...

Handling URLs inside a CSS in CakePHP

Heyall, I am designing a website using CSS Files a lot, but I have several occurrences of background images, images for bullets in lists and I will probably find another need for the css url() function. But, in cake, all URL should be handled by the Route::url() function, in several ways, being most common the $html->url() But my prob...

I have no style in my asp.net mvc application after upgrading to mvc rc

I am very confused because I am using iis7 integrated and so I should not need default.aspx in my project. However, after upgrading to rc at run time there is no style anywhere in my site. Here is my link to the style sheet that lives along side the master page. At design time, vs is able to pick up the style sheet so I have no idea what...

Style Sheet is not working in one web page

Style sheet in master page is not working for one web page of asp.net application but it works for another web page. ...

How to access programmatically to a style sheet in webkit engine (Chrome/Safari)

In IE with document.getElementById("css_id").styleSheet or in Firefox document.getElementById("css_id").sheet I've a style sheet object to manipulate but in Chrome and Safari browser that property there is not. How can I get that object? Thanks ...

Finding the Width of Tables or Cells

How do I find the width of a table or columns in a table without specifying it in HTML or Javascript? For example: <table id="myTable"> <tr><td>column a</td><td>column b</td></tr> </table> In Javascript: var tbl = document.getElementByID("myTable"); alert(tbl.style.width); //will be undefined ...

Triggering haslayout in IE 6, what's the side effect of using * html div { height: 1%; }

For a while, I've been putting * html div { zoom: 1; } in my base stylesheet, and it has worked great. However, I now run into situations where there're elements that are absolute positioned that are losing their heights and widths in IE 6 cuz of this. So I'm thinking of putting * html div { height: 1%; } instead, but what are the side e...

Accessing styles programmatically to get values

In our application we have style sheets to define common colors etc… I wrote a quick and dirty function where I get a dataset from a stored procedure, lop off the columns that I don’t want to show, cram it into a programmatically generated DataGrid, set that DataGrid’s styles, then export it to Excel. Everyone loves the colors in the E...

Append a stylesheet to an iframe with jQuery

I'm creating an HTML editor, similar to this one I'm typing in right now with the output below. I'm using an iframe and dumping the $htmlTextBox.val() into the body of the iframe. I'm trying to create a stylesheet inside the iframe so that it looks as good as it works. Thanks in advance! $htmlTextBox.keyup(function(){ SetPreview()...

CSS Control Inheritance - Inheriting Other Control Styles

Two parts to my question: 1) Is there a way to inherit another control's attributes and styles in CSS? Assume the controls have no parent/child hierarchy and can be completely different control types: IE: #MyFirstControl { width: 100px; } #MySecondControl { width: MyFirstControl.styles.width; /* This doesn't work */ } 2) Assume...

Overriding a CSS style

In a global style sheet used across all of our pages sits the following line: ul { margin: 0; } li { list-style-type: none; padding-bottom: 3px; } Therefore, any ul's inside my pages render with no discs next to li's. However, in special cases, I need to display the disc next to a li. I have a div with the class "blog-post" and thou...

Multiple stylesheets for a single XML document selectable in browser?

I have an XML file that I want the user to be able to see with two different stylesheets. The stylesheets are mutually exclusive, so only one of them should be active at a a time. I tried adding the following to the top of my XML file: <?xml-stylesheet type="text/xsl" href="brief.xsl" title="Breif" ?> <?xml-stylesheet type="text/xsl"...

PNG Transparency in IE6 - Need help with "How to apply hack for stylesheet"

Hi, I am trying to apply css for my table as show in sample "9.Table Background" as given in the below link. http://www.smashingmagazine.com/2008/08/13/top-10-css-table-designs/ It is working finr in IE-7 and fire fox. A comment for that sample is specified - " IE 6 users won’t see the transparent background if the hack is not ...

Hyperlinks disappearing

This is quite strange and I have never seen this before, maybe my computer needs to be restarted but: every link that I add on my web page is disappearing. You can see a live example here. This is my style sheet: /*------- UNIVERSAL -------*/ body { background: #333333; color: #222222; font-family: Arial, Helvetica, sans-se...

Error when using link href inside my ContentPlaceHolder

I am using a MasterPage in my project... This this the link i need to place inside my ContentPlaceHolder of my Dedault.aspx page <link href="jquery/imagebox/imagebox.css" rel="stylesheet" /> But i get a error "Element link cannot be nested within element td" Any idea what to do? ...

Breaking CSS Inheritance

In a page I use a tabstrip with its own stylesheets. This tabstrip writen with divs and anchors. I add some other divs into tabs but they inherit stylesheet from the outer tabstrip. This new divs has their own css classes. Here is my question, are there a way to break this inheritance without changing the structure of css ? Tabs' C...

how to use javascript to get visited link css styles

I would like to use javascript to style an element to look like a :visited link, without defining my own styles for visited links. How can I access the browser's default style for visited links, so that I can define a matching style that I can apply to an element (e.g. by applying a class name)? ...

How can I get three columns, sibling divs, each expand to fill its parent?

I have been searching forever. Sorry, I am pretty desperate at this point so I thought I would ask here. Below is an HTML sample. When column B is longer than a single page (viewport, sorry I am not sure on the correct terminology here) then A and C are not expanding in height to fill the container div. They fill the entire page but stop...

CSS/Jscript caching issue

Hi, I'm pretty new to web design and have recently been working on an amatuer photography website. I updated it on Sunday night, cleared cache etc on my home computer and it was all looking fine. The problem is when I checked it from work, behind corporate firewall etc, some of the pages have changed, some have not. For example the h...

How to get a CSS class property value in code behind

How can I get the value of a style defined in a CSS class? The markup has: CssClass="grdTextBox" Text="aaaaaaaabbbbbbbccccccc" The CSS style is: .grdTextBox {FONT-SIZE: 12px; FONT-FAMILY: verdana; } The .cs file has: string cssClass = txtComments.CssClass; Response.Write(" cssClass is : " + cssClass); How can I find the value...