css

Adding <span> to alternating comma delimited list in Jquery

I'm receiving a comma delimited list of items from a database and placing them in a table cell, and I'd like to add alternating styles, so they are easily differentiated from one another. ie, foo, bar, mon, key, base, ball such that the code looks something like this: <td class="wide">foo, <span class="alt">bar</span>, mon, <span cl...

How do I get the submenu to display properly?

I am building a horizontal navigation that also has a horizontal submenu. Soh Tanaka has a nice tutorial on it, but the submenu does not display properly. Here is the HTML: <ul id="mainNav"> <li><a class="selected" href="#">Home</a></li> <li> <span> <a href="#">Sub Item 1</a> ...

Are there any CSS padding heuristics that I can follow?

I have a simple problem: I have an image inside of a div. In order to make the page more aesthetically pleasing, I'm going to add some additional padding to the image. Rather than eyeball it, I'd like to know: Are there any CSS padding heuristics that I can follow? I was thinking that somebody of Jakob Nielsen's caliber might h...

Regular Expression jQuery validation

Hi guys. I have been given the task to apply regular expressions on a form validation which I have achieved (using jquery.validate.js). Now, I have to apply a type of regular expressions when the select tag is pointed to US and other type of regular expressions when is pointed to any other country. Any help will be fully appreciated. Tha...

JQuery Tools Modal Overlay - broken in IE8

I have a jQuery Tools Modal Overlay on my website, and it works perfectly fine in both Chrome and Firefox... however, when I view the page in IE8, the black background mask appears on top of the dialog DIV... in addition, the div appears at the bottom of the page where the actual code is as opposed to centered on the screen. In addition...

When I minify css or js, why isn't it all on one line?

I understand that minifying tries to reduce file size by removing whitespace characters. Sometimes things end up on one line, but more often than not, there are multiple lines. I noticed that line breaks happen wherever spaces occur. Wouldn't it be better just to have it all on one line? ...

Sticky Footer, but only sometimes...

I've got a basic site with header, content, footer. What I'm looking for is a way to style the footer so that, depending on screen resolution, if the content doesn't fill the page it sticks to the bottom, but if content overflows it pushes the footer down (have to scroll the browser to see the footer). <div id="wrapper"> <div id="headw...

align left and right with float: works in FF/IE but not in Chrome?

I'm using this .align-left { float: left; width: 49%; } .align-right { float: right; width: 49%; text-align: right; /* depends on element width */ } With this html: <span class="align-left">this shows to the left<span><span class="align-right">this to the right<span> And it works fine in IE/FF but not in Chrome...

Sticky Footer, but only sometimes...continued

OK, so now there's a new wrinkle. The original problem I was having: http://stackoverflow.com/questions/3118932/sticky-footer-but-only-sometimes. I have a scroll bar in my browser, and I can't seem to make the extra 70px margin go away... <div id="wrapper"> <div id="headwrapper"> <div id="header"></div> <div id="menu"> <ul>...

Nested classes selectors

If I have something like this in my HTML <div id="top"> <div class="txt"> <span class="welcome">Welcome on my website</span> <span class="links"><a href="Home">Home</a></span> </div> </div> How I can select the welcome class in my CSS. I've tried #top.txt.welcome but doesn't work. I've ...

CSS Reset with attractive default styles?

I'm looking for an open source css that performs a reset and adds a reasonable default level of attractiveness. For example, it might use better colors for the table, or give you some nice background images for a table. It might also give you some simple css classes to make lists attractive like listmatic.. Is there something like t...

how to learn web design technics

I am a beginner for web designing .I want to learn most useful method used in web designing world,please tell some tutorials for learn creative website using photoshop,css ,html,...... thanks. ...

Safari iphone/ipad "mouse hover" on new link after prior one is replaced with javascript

After you click a link on the iphone or ipad, it leaves a simulated mouse hover that triggers the a:hover css styling on that link. If the link has a javascript handler that keeps you on same page, the hover state will not change until you click on another link. This gets weird if you have an ajax widget that asks questions and each ans...

Prevent scrolling when videobox is on

I'm using videobox to embed streams into my site, and I just discovered that when videobox is "on"- i.e. I clicked on a link that brings it up and dims everything around it- I can still scroll down and see the rest of my (non-dimmed) site. This breaks immersion, and I'd like to disable the scrolling, but only for when the videobox is on....

Does this selector a[href="yourlink"] work in IE 7 and 8 ?

Does this selector a[href="yourlink"] work in IE 7 and 8? I'm using XHTML doctype. ...

Styling button background-image, button icon image, and text using CSS sprites

I'm trying to elegantly solve a styling issue with some buttons and images. My goal is to have buttons that look like the following: (Hacky mspaint mockup) However, I have a set of criteria I'd like to meet: I also need to be able to have the icon image exist as a button alone, with no text (i.e. the button background is the icon i...

CSS inheriting oddities

I run into this a lot and it's fairly annoying. Does anyone know about this: #content h5 { color:red; } #next h5 { color:blue; } When the markup looks like this: <div id="content> <h5>RED</h5> <div id="next"> <h5>BLUE</h5> </div> </div> The blue h5 will actually appear red, what gives?! ...

good website creation tutorial

Hello, I know that there are a lot of books where html xhtml css and javascript is described but maybe You know is there any example of creating modern website from scratch using above techniques with nice design and so on? Thanks for help ...

Print Css not loading

Hi I am trying to load my print.css but it does not seem to be loading. it work Fine in FF and Safari but the problem is only in IE. I have the regular external css for the page inbetween the head tags And when the user click on the print link . it loads the print css . <div class="linkPrint"> <a target="_blank" href="?format=prin...

Is there a way to style part of an input field's value?

I'm working with an <input> field and I'd like to style part of the field as the user's typing in a different color. For example, let's say the <input> has a style declaration of color: red; and I want to change part of it to color: blue;. Is there any way this is possible? If there isn't (as I suspect), any creative ideas on how I can ...