css

Which html elements should be wrapped with div? (<img>,<input>,<textarea>,<form>, <ul>, etc..)

Hi, A lot of times when I design I thinking about the question: Which html elements should be wrapped with div and in which cases? (<img>,<input>,<textarea>,<form>, <ul>, etc..) Example A- input text: option1 without div: <input class="input-wrapper" type="text" /> option2 with div around input: <div class="input-wrapper"><...

Cache javascript & css on user's browser and load new one when changes are made

Hi, this question might be available online but sorry that I cant find a solution that I understand. Can someone pls help me? The situation is this, I would like users' browser to cache external .css and .js files. However, each time I made changes, I would want user's browser be able to load the updated external files instead of using ...

When label tag should be used over span/dev tags in html form?

Hi, When label tag should be used over span or dev in form? Example: option1-span: <form action=""> <span>Name:</span><input type="text"> <input type="submit" /> </form> option2-label: <form action=""> <label>Name:</label><input type="text"> <input type="submit" /> </form> option3-div: <form action=""> <div style="display:inli...

Is there any way to use inline styles to define a:visited link style?

So instead doing it using css: <style type="text/css"> a:visited { color: red; } </style> Could it be done using inline code. Something like this doesn't work: <a href="http://google.com" style='a:visited:color:red'>Google.com</a> ...

TabPanel within TabPanel styling

My app's layout consists of a TapPanel, which holds another TabPanel. I'd like to have the two TabPanels look differently. Following the GWT tutorial on applying styles I did the following: TabPanel innerTabPanel= new TabPanel(); //carriersTabPanel.setSize("100%", "100%"); innerTabPanel.addStyleName("inner-tabPanel"); .gwt-TabPanel .i...

enforcing (minimum) width of a td that optionally contains an image

How can you enforce the minimum width for a TD that can optionally contain an image? I ask this because I'm using a Javascript chess widget but when there are no pieces in any of the squares of a particular column, regardless of the width style of the td's being set to 36px, this column renders much narrower than those that have at leas...

Navigation on Website Positioned Incorrectly

Hey there! I'm currently converting my portfolio mock up into html/css and I've come across something that has confused me. http://www.mozazdesign.co.cc/ As you can see, the navigation text is positioned in the wrong place; I want it to be inline with the markers. I've looked through the code loads and looked at other websites but c...

How can I validate CSS within a script?

Is there a library out there which will validate CSS? The only tools I can find to do so are web sites. If one of these sites has an API, that would fit the bill, too. I have a script that serves as a CSS compiler. It sets various variables according to settings for a theme, and generates and writes a CSS file. Before committing to wri...

CSS list menu rollover padding / margin

Hi, im wondering if anyone could please help me with a css / html issue. I have a complex background image. The menu div is positioned at the correct location to overlay the background where it is ment to position. The entire LI has a hover rollover image with a display type of block. The result is that when the mouse is over the list ...

JQuery how to set class css data to a div but without setting class name or with other class name

I need to copy a class data to a div, but without setting class name or with other class name. for instance: $('#blabla').addClass('xxx'); And then remove the class name but leaving the style data. The thing is that I need to set the style information but I can't set the class name because It gets conflicted with some other code. ...

How do I determine when a child of an overflow:hidden parent is overflown

Below is my HTML and CSS. I want to use javascript to determine when one of the LIs is overflown. I then want to put that item into a popup menu, similar to Win32 toolbars. I need to know when an LI is overflown and which LIs are overflow. I'm fine if this only works in modern browsers and I don't want to use a framework like JQuery. <...

List Item Background Image - Neighbor Floated Content Overlaps

Hi all, I've used list item background images for customized bullets hundreds of times in the past, and somehow never came across this issue. Essentially, I have an IMG floated left of the Unordered List. The bullet background images are set to top-left of each LI. However, the floated image is covering the bullets, as the browser is...

html & css: Remove column dividers in a html table

I have a html table with css. Currently all the cells have a white border around them, I am having trouble removing the column borders for each cell so the rows are divided by a white line. A similar table to what i'm trying to achive can be seen at http://www.smashingmagazine.com/2008/08/13/top-10-css-table-designs/, look at example 3 (...

Aligning text. Using tables or css or &nbsp; ?

Frequently I am aligning text such as: To: 07/02/2010 From: 07/02/2010 Id like it to be displayed like this: To: 07/02/2010 From: 07/02/2010 So what is the quickest/easiest/best way to do this? CSS? using a few nbsp (would work if its mono spacing) or using tables. Normally if I am not in a anti-hating table mood, ill use tables....

html css wrapper div not working

Hi, i have the following web page layout.. What im failing to understand is why the content div is displaying outside of its parent wrapper div on the right hand side.. Code as follows and thanks for any help.. @charset "utf-8"; /* CSS Document */ * { margin: 0; padding: 0; } html, body { height: 100%; } body { padding-top...

How to ensure CSS opacity changes to text/links don't change the color value in Firefox/Windows?

So I noticed that when I do an opacity change to a text or link element in Firefox (3.6+) on Windows, along with an opacity change, the color changes as well. For example, the blue text link shifts to a yellow just before it disappears. Have a look at http://linowski.ca/experiments/onproximity/ and move to and from the text link named ...

Grabbing entry domain for a site.

I have several domains that point to the same site, some of them ending in ".br" (domain for Brazil, thus for portuguese speakers) I want to detect from what domain the person came (.br or not) and load the correct landuage... I can use PHP, JavaScript or standard HTML/CSS etc... How I do it? (and with what?) ...

CSS 3 Transitions on the display: property

Hey All, I'm currently designing a kind of css 'mega dropdown' menu - basically a normall css-only dropdown menu but one which contains different types of content. An example can be found at http://www.westore.it/testbed/about/ My question is more of a 'can you think of a way around this problem' sort of thing. At the moment, it appea...

CSS Border Help

Hi, Using current CSS and not CSS3, is there any way of specifying a raised type border style as I would like to somehow emphasize my menu. Basically after a border that has has a rounded edge, not rounded corners. Thanks. ...

When to use CSS + sign....

Hi guys.. Very easy question. I have been using CSS for a while but rarely use + sigh for my code. Could any one explain what the best time is to use it? I couldn't find anything from Google...Thanks a millions... ...