css

Paragraph tags in Conflict with Meyer's Reset in IE7?

Working on a rather small, and simple layout, I decided to use Meyer's CSS Reset rules to clear some of the expected discrepancies between browsers. All was working fairly well until I decided to add a few paragraphs into a couple nested divs. Once I placed the paragraph-tags within the second nested div, the background images of both t...

Why is vertical-align:text-top; not working in CSS

I want to align some text to the top of a div. It seems that vertical-align: text-top; should do the trick. It doesn't seem to work. The other things that I have done, such as putting the divs into columns and displaying a dashed borer (so I can see where the top of the div is) all work fine. <style> #header_p { font-family: Arial; fon...

(Simple) Can HTML properties be attributes or are they only for CSS?

The SVG spec talks about Properties.. what are these? Can they be declared as attributes inline with the element? .. or can they only be declared in CSS stylesheets? ...

css float troubleshooting

i've got a very simple CSS example detailed below. The .entry class generates a simple box with a 1px black border. the example below, will render "123" within the box and "abc" and "xyz" outside the box because those elements are tagged with float left and right. My goal is to have .box1 inside .entry aligned left, and .box2 inside...

Is there a way to make a DIV unselectable?

Here is an interesting CSS questions for you! I have a textarea with a transparent background overlaying some TEXT that I'd like to use as a sort of watermark. The text is large and takes up a majority of the textarea. It looks nice, the problem is when the user clicks in the textarea it sometimes selects the watermark text instead. ...

Clicking through layers/divs

If I have two layers on a page, split horrizontally, with the second layer overlapping part of the first layer, is it possible to make it "click through"? I have links in the first layer, which the second layer overlaps, which stops the links from being clickable. Is there a way to make the layer display, but be click through, while sti...

Is there an alternative to CSS?

Is there a style sheet formatting language alternative to CSS? Or is CSS the current single language for doing Style Sheet formatting type things? I looked at the write up of CSS on Wikipedia (http://en.wikipedia.org/wiki/Cascading_Style_Sheets) and a few other comments about CSS and became discouraged about the lack of full support...

Detecting hover on invisible divs overlaying flash in IE7

I have a page with a 100% width/height flash movie that is overlayed with HTML. Yeah, this site is a best-practice breaker. One of the HTML overlays is a invisible div I use as a "magic detector". There is an element that slides in/out on the page, I use the invisible div to create a "hot area" around this element, so that the element w...

Inline img with <a> causes weird issue in IE

Doctype: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; HTML: <a href="http://www.somelink.com"&gt; <img src="images/someimage.jpg" alt="sometag" /> </a> CSS: div.somethin...

How can I improve this markup and CSS to keep things simple and easy to work with?

I have the following markup that is used to produce a pop-up style mega-menu (the .column div is there to allow multiple columns within each popup, though the example below only has a single column)... <ul id="mainmenu"> <li class="mega"> <h2><a href="/">Menu 1</a></h2> <div class="submenu col1 leftmenu"> <div class=...

Is there a tool to take proper HTML + CSS and generate inline-styled HTML? Or: convert it to email compatible HTML

possible duplicate: What tools to automatically inline CSS style to create email HTML code ? note from author: Oh yeh, definitely duplicate. Sorry. In general, HTML emails do not support proper CSS techniques. However, it's nice to develop in these techniques because it makes it a lot quicker to play around with changes etc. (I don't...

Float image right within li of ol, text left, works in Chrome, not IE/FF

I would like to have an ordered list that has the text on the left and an image for each li within it on the right of the li. So I floated the image to the right and it puts the image correctly on the right and text on the left, but the image is 14 pixels too low in IE and FF. Chrome does it right (see images below). This appears to me t...

Internet Explorer margin issue inside div with padding

In this case, internet explorer doesn't seem to give the right amount of margin. It looks like it measures the margin from the top of the box and ignores the padding. Why is this? Is there a good workaround? Here's an example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-tran...

Narrow Line Break

Is there a more efficient way than <div style="height: 6px;"></div> To make a "narrow" line break? i.e. narrower than text text text<br/><br/> ?? ...

how to append a css class to an element by javascript?

suppose id is known, so the element can be specified by document.getElementById(element_id); but I don't know if there is a built-in function that can be used to append a css class to that element? ...

Any way to display some heavily-styled HTML in isolation from the rest of site's styles?

I am trying to figure out a way to display an archive of email newsletters on my client's site. The issue is that the newsletters are full of a zillion inline styles, which is great for seeing them in Outlook or wherever, but they're not looking too hot in an otherwise-nicely styled site. My goal is for my client to be able to copy t...

How do you deal with Internet Explorer?

I am aware that there are probably other questions regarding this topic. I guess that every web developer goes through this with IE. My problem: I am developing a web-based application fully based on Javascript. I am a Mac user. I was really happy that everything worked great in Safari, Firefox and Opera. I then asked a friend with W...

Whats better using HTML/CSS edited by hand or using design programs? and why?

For design websites is it better to do it your self by learning HTML/CSS or using web design programs? and why? ...

Javascript and CSS Lightbox that can view PDFs

Has anyone ever found any lightbox type javascript / css code that can display PDFs? I have tried many libraries and none have worked for me. The environment needs to be IE6/IE7 compatible. I am looking for something similar to this: Lightbox 2 ...

CSS Layout with Pixel And Percents

I have a div which contains two nested divs, one that specifies a height of 65 pixels (header), the other which specifies the height as 100% (content) and it is supposed to take the rest of the space veritically. When the page renders, there is a scrollbar on the right because of the height specified of 65 pixels of the header. What am ...