css

How to convert 6 digit color code to 3 digit quickly in css file ?

I have a large css file and i want to convert all 6 digit hex code into shorthand 3 digit. Is there any online or offline tool to do so. my purpose is to reduce css file size without making something wrong. any other tips would be be appreciated to reduce css file size without affecting css output. Edit: As me_and suggested css drive...

CSS Hacks, Firefox 3.5 and Google Chrome

I searched around and allegedly, body:nth-of-type(1) is used in CSS to target only Safari and Google Chrome. Lo and behold, Mozilla reads it properly too. I searched ten times more but came up with nothing, so here I am. Is there a Google Chrome-only CSS hack? ...

JavaScript $('myDiv').style.direction always returns blank?

Hi, I'm trying to get the direction property for the element. I have this code: document.write('<div style="position: absolute; display: none;" id="menuDiv"></div>'); And in my .css file I have: #menuDiv { direction: rtl; } Then, using prototype, I'm trying to query the direction for that div: alert( $('menuDiv').style.directi...

Is there a way to programmatically download a web page, for offline viewing, using WebKit?

What I'd like to be able to do is download any web page, and be able to view it offline. It seems like html WebKit views cannot be converted to PDFs (on the Mac, you could 'print' a PDF, but that isn't possible on iPhone?). So, the only way is to save the actual resources - save the html, the step thru each image, css, js file and save...

Textbox autofill not in correct position in safari

Hello All, Has anyone experience this weird issue on safari? Textbox autofill is not at its correct position, please see screenshot below. I have been searching for answers in google for almost a day, still no luck. This is the built-in autofill feature of safari. Here is the markup: index.php <html> <body> <div id="nav"></di...

Take a TR and force it to become vertical (like a list) using only CSS

I have markup like this: <tr> <td>test</td> <td>test</td> <td>test</td> <td>test</td> <td>test</td> </tr> That obviously creates a horizontal table. Is is possible, using only CSS to make that table display with only 1 item on each row? The desired output is similar to a unordered list with no margin or...

What is the best strategies to write CSS for CMS generated HTML where I can't modify HTML?

What is the best strategies to write CSS for CMS generated non semantic HTML with overuse of Divs, spans. I can't modify HTML? I can add javascript and css files but can't add xhtml code. Is there any things needs to be concern? Edit: See example code of horizontal dropdown http://jsbin.com/emuco/edit ...

How to make common reusable css for almost every common things in web design?

How to make common reusable css for almost every common things in web design? Like Horizontal and vertical form with javascript validation, Horizontal and vertical navigation with or without dropdown, multiple horizontal boxes etc. ...

Isolate the styles in TinyMCE?

Hi is there a way that the content entered via TinyMCE isn't affected by the site's css? I want it that way because I want to display the content exactly as the user has entered in the editor. Thanks in advance! ...

If user = XXX visitor, prompt for email...?

I'm trying to code a site where every 10,000th visitor is prompted to enter an email which can be stored in a text file. I have a hit counter set up where it outputs the total visitors to a text file, so is it possible to set up a script to something like "If number =*(10,000) from visitor.txt then prompt for email save to =emails.txt...

Is there any pros and cons if i use always CSS Class instead CSS ID for everything?

In CSS we can use both ID and class. is there any pros and cons if i use Class always instead ID in terms of Semantic, Web standards- W3C , SEO , Accessibility and future maintainability? ...

Child elements with margins within DIVs

Hi, I need two consequetive divs (with backgrounds) to be touching seamlessly, one below the other. However, this layout breaks when I put a child p element into the bottom div. The margins of the p element force a blank gap between both divs. This is strange behavior, as I am expecting the margin of the p to stay within the content and...

make asp.net server control cross browser compatible.

How can i make asp.net control cross browser compatible? it is compatible with IE only. Let me know the best steps to do this. ...

How to control screen-orientation for iPhone in web app

I have a very basic web page that uses flot to create a canvas based graph (similar to what SO uses for reputation graph). In the case of a PC display, it should simply output normally, with a the width (x-axis) being 1.6 times the height. But for iPhones, I would like it if, rather than having it overflow in "canvas" orientation, the ...

How should i start to learn javascript/jquery etc.? My programming knowledge is zero?

I'm from design background. My programming knowledge is zero. After learning xhtml and css i want to learn and get good command on Javascript/jquery etc. How should i start? This will be my first attempt to programming. I can use and edit readymade available jquery/javascript scripts but can't make my own and can't do high level editing...

How to make the drop down list in header frame overlap body frame?

I have a header frame, and a body content frame. My header frame by default is to put logo and logout button. My body frame is to put all the contents. Issue now is: I decided to add in a drop down menu at header frame. When scroll over, it will drop down a long list. But, when scroll over, it drop down inside the header frame itse...

dynamically change css class using js

Hello I'm having a problem while trying to dynamically change a table cell's styling class using JavaScript. The following issue happens on FF, I opened the page on other browsers too and it worked fine. I have a html page that contains a 4x4 table. I would like when I click on a cell, to zoom it in and when I click on it again to zo...

CSS not loading up in ASP.NET site when using view in browser

I have this asp.NET web site that for some odd reason doesn't want to load css and script from the plugin I just wrote. This occurs if I use View in browser option in Visual studio. If I preview a sample file in browser directly from file system, it works OK. I have checked source code of ASP site and it contains both files. In Firefox ...

Find computed style "source" ("trigger") in DOM inspector

Is it possible to find in DOM Inspector what tag/class/id combination triggered a particular Computed style rule. In my particular case I have a font that changes its appearance if a wrap the fragment in some other tag combination. So I see the different computed Style font-size(s), but can not quickly understand the difference in the c...

Strange IE7 borders behaviour

Hello everyone, my website looks ok in all browsers expect for IE7 I have lot of issues with this browser. Below is the image with which I have problems : I made a pagination which has a problem with IE7, the border bottom and top doesn't render, anyone knows why? here is my css mayber that will give you hint what is wrong? div.Page...