css

HTML CSS How to stop a table cell from expanding

Hi, I have a table which is built with the contents coming from a returned dataset. What I want to do is stop a 'description' cell from expanding over 280px wide, no matter what the content length (its s string). I have tried: <td align="left" valign="top" style="overflow:hidden;" nowrap="nowrap" width="280px" > But this doesn't se...

How do I calculate an elements position in a scrolled div?

I have a div with absolute positioning set to allow vertical scrolling. My app includes drag & drop facilities that rely on me determining the coordinates of elements when events are fired. The offsets I use to calculate elements positions (i.e. element.offsetLeft & element.offsetTop) only relate to original position of the element and ...

Weird IE7 Bug/Error

Hi all, I'm having some problems with a certain piece of code which sits in my site; this error only occurs in Internet Explorer 7. Rather than post all my HTML/CSS markup here I have put up a version of the site here. As you can see I have "Widgets" in columns, for some reason IE7 adds an extra space under the Widget Header while FF ...

How to display code on iPhone using HTML/CSS

The iPhone is admittedly not the best platform for viewing code, but I'd like to optimize the mobile portion of my web site for the device as best I can. I'm having trouble getting code (Java code, in this case) to display properly. I'm using <pre> tags, along with some CSS to render a nice little background for the code. This looks...

How would you code this: Grid-breaking shapes

I'm a person that learns best from example. Currently, I'm diving into the field of Web Development after fifteen years of developing desktop apps. I'm still getting used to all the web technologies used for developing modern web sites and everywhere I look, I see cool little UI elements and question how they're implemented. So I thought...

what does that mean <td class="bodytext2">

I see it in the jsp pages and not sure what it means? <td class="bodytext2"> it causes text to display blue, and I don't want it ...

Positioning Labels And Inputs With CSS

Hello. I have achieved to do this (a form layout) ... ... with the next CSS ... label { clear:left; float:left; margin-right:10px; text-align:right; width:100px; } input { float:left; } But I was trying to do this other thing without success ... It's like a subform with the same layout in place of an inpu...

I want to know how give the name of css selector in IE

I want to fit my website in IE .I want to know how i give the name of css selector in IE like firefox.Please help me! ...

Using FBJS to change CSS

I'm a bit stumped by the Facebook implementation of Javascript. I want to set up a listener on a checkbox so that when checked, it changes the class of an element I can get by ID. I've been using the test console and have tried various permutations. Javascript is NOT my first language, nor my second, third... COuld anyone help me by tra...

Chrome resizing CSS background url image

I am using Google Chrome 3.0.196.2 and I noticed that for some reason the #main div's background is shrunk a tad bit, even though it should not be. It tests fine in every other browser but chrome. Anyone know why? Link to site: link text Even have a screen shot: link text Notice the green on the right side is cut off, as well as thin...

The best way to "clear: both"

Hi For long now, I've been using a CSS class called clear, which only has the rule clear: both. I use it in the following way (shown in Django-syntax, but it is unimportant): {% for item in collection %} <ul class="horiz"><!-- horizontal list --> <li>{{ item }}</li> <li>{{ item }}</li> </ul> <div class="clear"></div> {% e...

using text-align center in colgroup

i have a table in my page, i use colgroups to format all cells in this column the same way, works good for background color and all. but cannot seem to figure out why text-align center does not work. it does not align the text centered. example: <table id="myTable" cellspacing="5"> <colgroup id="names"></colgroup> <colgroup id=...

What books to start on web programming for an experienced non-web programmer?

No surprise here, possible dupes: Good Books for Learning Web Programming Required Reading for a Soon to be Web Developer and there will be more. For a personal project, I'm starting to do some web programming using Django. I've programmed since I was very young on several languages, mostly Pascal/Delphi, C/C++, SQL Pyt...

Problem with aligning divs

I have 3 divs each of 250 width and 125 height. How can I align them next to each other so that they work on most of the browsers? ...

“text-decoration” and the “:after” pseudo-element, revisited

I'm re-asking this question because its answers didn't work in my case. In my stylesheet for printed media I want to append the url after every link using the :after pseudo-class. a:after { content: " <" attr(href) ">"; text-decoration: none; color: #000000; } In Firefox (and probably Chrome but not IE8), text-decoration:...

Two columns in div - Which one to use 1) float along with margin or 2) Two floats

Hi, I have two divs in a container. One is left bar and another is right bar. I need some advice/suggestions to use which method. Method 1: #container{ width:800px; margin:0 auto;} #leftbar{ float:left; width:200px; } #rightbar{ float:right: width:550px;} Method 2: #container{width:800px; margin:0 auto;} #leftbar{ float:left; width...

CSS: Fixed background images taller than the browser viewport

I've got a large photo (940x1210) as the background image for a #page div which wraps around all the content on a site. Since the photo is a headshot, it looks pretty silly tiled, so I've set it not to repeat, and positioned it at 0,0. When the content enclosed by #page is taller than 1210px and the background image is set to scroll, t...

Can I force a refresh of my stylesheet file?

I have just spent half a day quietly going mad. I'm making changes to my classes in the Site.css file and they were not being reflected in the site being developed on my machine. Because I'm learning my way through jQuery and playing with addClass and removeClass and I'm creating the parameters for those calls dynamically, I was sure...

What is the standard of coding in PHP in the sense seperating css, phpfles and database

Give me the best standard way of coding in PHP. where to store my css, php, images etc. How to seperate my folders, How many folders and whats the name of that folder? ...

Relative Positioning Div

I've created a div and add 2 divs to it: <div id="content"> <div id="a"></div> <div id="b"></div> </div> and the styles: #content { width:100px; height:100px; background-color:blue; } #a, #b { position:relative; top:0px; left:0px; width:100px; height:100px; background-color:red; } #b { top:-100...