css

get viewport position in javascript in iphone safari

Hi everyone, I'm trying to prevent element from scrolling in safari on iphone. I've tried solutions mentioned here: http://stackoverflow.com/questions/777621/iphone-safari-scroll-a-list-inside-a-html-container But my list is large and it doesn't work so smoothly. What I have in mind is to detect onscroll event and reposition the elemen...

What are good web development fonts?

I am searching for a list of fonts I can use in CSS. Since these fonts may be copyrighted, which fonts should I use that are available across Windows (as of XP), Mac OS X and, say, Ubuntu 8.04? I don't want to rely solely on the newer OSs. A great bonus would be if the same fonts existed on mobile devices. ...

How to make a div 100% of page (not screen) height?

Hi all, I'm trying to use CSS to create a 'greyed out' effect on my page while a loading box is displayed in the foreground while the application is working. I've done this by creating a 100% height/width, translucent black div which has its visibility toggled on/off via javascript. I thought this would be simple enough; however, when t...

Way to update css properties on-the-fly based on form content?

Hey all, I have a form on a website, in which one of the inputs is to be used to enter hexadecimal colour codes to be entered into a database. Is there any way for the page to dynamically update itself so that if the user changes the value from "000000" to "ffffff", the "colour" CSS property of the input box will change immediately, wi...

Push vertically resizable Div to bottom of wrapper. How?

First of all, hello all. This problem is driving me to insanity so I hope for a simple solution Here is an image of what I wanted originally. But I didnt want to use hacks to get Box 1 and (Box 2+Box 3) to expand with each other. So I will just use a background color on the wrapper instead so its not noticeable that they have differe...

jQuery CSS plugin that returns computed style of element to pseudo clone that element?

I'm looking for a way using jQuery to return an object of computed styles for the 1st matched element. I could then pass this object to another call of jQuery's css method. For example, with width, I can do the following to make the 2 divs have the same width: $('#div2').width($('#div1').width()); It would be nice if I could make a t...

How to maintain PNG alpha transparency when using "-ms-filter" property

I have the following HTML: <a><img src="myfile.png" /> Some text</a> And this css: a:hover { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=75); opacity: .75; } The problem with this occurs in both IE 8 and IE 7. When the PNG image is subject t...

Anyone Using Nicole Sullivan's Object Oriented CSS Framework?

Edit: Due to an excellent comment by Kobi pointing to this StackOverflow Question, I have amended the question below: Has anyone out there tried out Nicole Sullivan's Object-Oriented CSS framework or one of their own? If so, what were the advantages/disadvantages? Are there any production sites using the framework Object-Oriented CSS? ...

How to get CSS file to affect only a section of HTML

I have an external CSS file (I cannot change it at all) which I need to use in my HTML file, but I want the CSS to only affect a section of my HTML. (For example everything in <div id="externally_styled"></div>) How is this possible, again, without changing the CSS file (and the CSS file contains also general styles that affect body tag...

setting rowspan on colgroup?

Simple (I hope), HTML question. Let's say I have a column group that spans 3 columns. But it also spans 9 rows. But in actuality, I want there to be 3 levels of columns (so basically, 3 columns, split across 9 rows). The only objectives really are: a) avoid embedding tables (for various reasons) b) keep the sections modular. c) allow ...

How do I show content when Javascript isn't available, hide it when javascript is available and not flicker in either case?

I have a simple form for shipping options and I am using javascript to auto submit the form when someone selects a new option from the drop down list. In order to support browsers without javascript there is also a button to submit the form. This button is hidden using javascript. However, this means my button is visible for a brief pe...

Positioning Bug <IE8 - Why? Best workaround?

I noticed that a site I'm maintaining had a little layout bug in FF/IE8/Chrome (on this page for example) - the image in the top left hand was a little high, straying into the header at the top. I wondered why I hadn't notice it when I took over the site, but I realise it has only since I upgraded IE7 to IE8 that it had become apparent ...

html form and negative top css values

I'm trying to position a small little search box form using CSS with a negative top value but when I do this you can no longer click in the text input box or click the button. You can still tab to the form and functionality still works. I've tried positioning the form itself, putting the form in a div and positioning that, positioning a ...

How to organize page layout with div's

Hello, I have a question for the more experienced programmers here. How can I best organize the div's to have like a left side, a middle side and a right side? I am doing my website now for a while and I spend half a day moving div's around because they don't stay in place after I put another one in and I want to work with the relativ...

Having Trouble with Repeating Images

Working on a site that is just HTML and CSS. I am quite new with this. I have a header, body and footer that I would like to repeat to fill up the page. Think envato.com. Here is some sample code I have so far. CSS: .blkside { z-index:99; background-image: url(/images/blkside.jpg); background-repeat: repeat-x; top:0px; right:85px; pos...

radio buttons disappear in ie and chrome

The below is in style sheet select,input ,td a {border:1px solid green; width:25%;height:25px;font-size:20px;margin- left:.1em;} input.myradio {border:none;width:0%;height:0%;font-size:0%;} The below is in html <td><input class="myradio" type="radio" name="poolstatus" value="Add">Add</input><td> It's perfect in firefox but chrom...

Why does Firefox put a horizontal scrollbar on my div?

I've got a very simple test case: <html> <body> <div style="border:2px solid black; overflow: auto;"> x </div> </body> </html> When I render it, I get a horizontal scrollbar: I had been using FF 3.0.3 for Linux, and thought it might be a browser bug, so I upgraded to FF 3.5b4 (the latest release candidate). Still ...

How much weight does a pseudo class have?

I'm working in a DNN environment where the default style sheet which every site loads sets styles for pseudo-classes. I could edit the default style sheet, but since this is stock and comes with all upgrades, I'd prefer to leave it alone and override their styles at the skin level. Does anyone know of a solution to get all these pseudo ...

CSS: Can I select every type of element that are not within a specific class?

Let say I got this page: <body> <h1>Hello!</h1> <div class="wrapper"> <div class="anotherclass"> <h1>Another heading 1</h1> </div> <div class="yetanotherclass"> <h1>Yet another heading 1</h1> </div> </div> <h1>Good bye!</h1> <div class="class"> <h1>Good ...

Position absolutely positioned DIV relative to (also absolutely positioned) parent DIV?

This is one problem I always have when i'm fixing layouts. I've got a absolutely positioned DIV, I place a child-DIV inside which also needs to be absolutely positioned. But I really want this child-DIV to behave relative to the parent... Is this even possible? Or do I need to create a wrap-DIV? <div class="container" style="position:re...