css

Print stylesheet precedence

Hi, I have inherited some legacy code which generates a ton of inline styles. The client requires a print stylesheet which i am not sure will override the inline styles. Assume not. Would there be a way with jQuery to rip out all the inline styles whilst preserving the HTML structure prior to the print CSS being applied? ...

Which clearfix method?

/* Clear Fix */ .clearfix:after {content: ".";display:block;height:0;clear:both;visibility:hidden;} * html .clearfix {height:1%;} or .clearfix:after {content: ".";display:block;height:0;clear:both;visibility:hidden;} * html .clearfix, *:first-child+html .clearfix {zoom:1;} Which would work the best? I used first one by now and neve...

Parent element not in center

My Html markup <div id="main-wrapper"> <div id="header-wrapper"> <div id="header"> </div><!--end of #header --> <div class="clear"></div> </div><!--end of #header-wrapper --> <div id="content-wrapper"><!-- this is closed in footer.p...

Styling “input file” - works great, but there is a little annoying problem...

I'm using Firefox 3.6.6. I styled my "input file" that looks like this: Here is the code: (live example here) HTML: <div id="wrapper"> <div id="customButton"> <img src="http://i28.tinypic.com/2nv5lww.png" /> <span>Choose Files</span> </div> <input id="fileInput" type="file" size="1" /> </div> CSS: #wr...

YUI skinning scrollbar used in container

How can I implement custom-looking scrollbars in YUI containers? ...

css - Padding under background image link next to text link - why?

This CSS problem is killing me :-( I cannot remove padding under a link in this page http://www.yart.com.au/stackoverflow/test2.htm I have reduced the problem to the bare minimum so its really clear. You can see my issue here http://www.yart.com.au/stackoverflow/blue.png <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...

How to change cursor based on mouse position ?

I would like to change the cursor from default to pointer when the mouse enter the rectangle (50, 50, 100, 100) of the body element (the numbers are in pixels). I know that I could define a div, place it at this position, and set cursor: pointer; on it, but I'm looking for some way without defining a div. I would like to something like...

3 row layout, header and footer fixed height and fluid content but scrolling

Judging by earlier questions and their lack of answers, I'm not sure there will be a good answer for this. Fortunately, we only need to support newer browsers. Looking for a layout to let us have a 3 rows with a fixed-size header and footer, but the center row is fluid with the height of the browser but will also scroll when it's conten...

ASP Menu Position

Hi All Please note, I am a beginner when it comes to web page coding so please go easy on me! I have a simple master page that contains a banner at the top and an ASP menu control down the left hand side. I want the page to be be centre justified and so I have div "outer_div" with the CSS attributes: text-align:center margin-left:auto,...

Validate CSS: Opacity?

I'm doing a new site and getting the following error: Property opacity doesn't exist in CSS level 2.1 but exists in : 0.5 0.5 For this chunk of CSS: .nav-next img, .nav-previous img, #all-headers img { opacity: 0.5; } This is using the Jigsaw W3C Validator. I see opacity in CSS3. Am I missing something in my stylesheet, or is ...

How to Show JSF error message in between text fields when error occurs

I have a panel layout which has some text fields that require validation. What I need is to let error messages be shown between the fields (not on top or behind them): i.e I want the error message to take its own space and/or drag down the other text fields when the error occurs and everything returns to the way it was when the error van...

Disable Text Cursor in IE

I'm using a DIV as a simple DHTML graphical button on a webpage. It contains no text, and a background image provides the button's appearance. This works perfectly in Firefox and Chrome, but in IE, when the button is clicked a blinking vertical text cursor shows up, presumably where the text line would start. How do I disable this? I've...

Menu Button Assistance

Hi, Based on this menu structure: menu system I want to purely use a CSS based Menu System but am unsure what is the best way to approach to get the blue gel 2D button look based on "Home" and "About Us" ? I basically would like to know how to achieve this button look and then in CSS use this background button and then be able to add...

CSS priorities don't seem to working

Hello I have this in the footer file of a wordpress theme. <div class="footer"> <!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. --> <div id="icons"> <ul> <li><a href="#">Wordpress</a></li> </ul> </div> <p> ...

Can't find code for an <a> tag

I'm trying to work with mytablegrid. There is a working example here On the bottom of the grid, there is a small subtable called the "pager" which allows the user to navigate between pages. The html is like this : <a class="mtgPagerCtrl" id="mtgFirst1"> <img height="16" width="16" border="0" mtgfirstpage="" class="" src="../images...

ie6 PNG fix causing 24 bit PNG images not to scroll when nested in div with overflow auto

I am using the following PNG fix for IE6: http://www.dillerdesign.com/experiment/DD_belatedPNG/ It is referenced thus in the head of my document: <!--[if lt IE 7]> <script type="text/JavaScript" src="../../Scripts/DD_belatedPNG_0.0.8a-min.js" defer="defer"></script> <script type="text/JavaScript" src="../../Scripts/DD_PNG_listing.js" ...

Doing a top level navigation with drop downs: have IE bugs pt.2 (UPDATED)

Sample code is below. If you look at it, you will see gray drop down boxes. These boxes are present in all browsers, but don't show in IE6 / IE7. Is there anyway to get this working in those browsers, without removing styles critical to the layout (for instance, I think removing a overflow: hidden off of something gets it to work but bre...

How to have a text input with padding fill its container

Of course, width: 100% on a block element fills the container, but only if border, padding, and margin are zero. Putting such an input in a containing div with padding does the trick, but I'm curious why simply input {display: block; width: auto;} doesn't work. Suggestions? ...

Are there any cons to using color names in place of color codes in CSS?

For Example Writing red is more efficient than #cc0000. It's less characters, less space, and easier to remember. Should we always prefer color code over names? In multi-developer environment. Edit: Over the last few years, all of the major browsers have included support for a special set of 140 colors that are recognized ...

Why is image preloading ineffective?

My CMS project has a stylish web 2.0 login screen that fades over the screen using javascript. How come that even though I have made 120% sure that images are preloaded (I used the resource monitor in development tools) they still take a second to show up when my login screen appears. It completely destroys the fanciness! Take a look: h...