css

print out paging with css | page-break-before:always; cross-browser issue!

Hi friends, I have an issue about print paging. you can see my code below. it is not making page break for the print preview :( any idea what can be the problem? Appreciate helps! HTML Code <h1>header text</h1> <p>Lorem Ipsum jhdfb jdhbg sdfgshdbfgkjhsdbgkjhbs d sdgf</p> <div class="pagebreak"></div> <h1>header text</h1> ...

Is it possible to use CSS to update parts of an HTML page in a way similar to frames?

Is it possible to use CSS to work like frames? What I mean is, when we use frames (left, right for example), clicking on left will refresh only the right section using the 'target' attribute. Is it possible to create this effect with CSS? Thanks. ...

jQuery animation issues

Hi all, This is kind of difficult to explain, so I'll paste the function, and explain what it does function close(r){ if(r !== undefined){ $('#close').attr('name','1'); $('#close').css({ top: 30, left: 30 }); $('#close').html('First click here'); }else{ switch($('#close').attr('name')){ case '1': $('#close').at...

How do I prevent DIV tag starting a new line?

I want to output a single line of text to the browser that contains a tag. When this is rendered it appears that the DIV causes a new line. How can I include the content in the div tag on the same line - here is my code. <?php echo("<a href=\"pagea.php?id=$id\">Page A</a>") ?> <div id="contentInfo_new"> <script type="text/javascr...

How to access CSS properties for a DOM node using the Cobra/Lobo HTML renderer

Hi, I am trying figure out how to access CSS properties for a DOM node (in this example <img> nodes) using the Cobra/Lobo toolkit. What I have at the moment is: UserAgentContext uacontext = new SimpleUserAgentContext(); DocumentBuilderImpl builder = new DocumentBuilderImpl(uacontext); URL url = new URL(TEST_URI); Input...

How do I access the individual styles of a CSS rule-set using JavaScript?

If I have a style defined using a class selector: .example { width: 50px; } And in JavaScript, I would like to get the value of the width property for that rule-set, without using some reference to a concrete element that uses that rule-set. I want something which would give me the output "50" or "50px" given the input of "example" an...

css float problem

I have about 8 paragraphs which I would like to float left, but some of the paragraphs have more text than others. So when I view in a browser, I get the left to right floating that I want, but I get multiple short paragraphs in a column when some paragraphs are longer and some are shorter. What I want is for each new paragraph to be i...

Apply CSS to jQuery Dialog Buttons

Hello, So I currently have a jQuery dialog with two buttons: Save and Close. I create the dialog using the code below: $dialogDiv.dialog({ autoOpen: false, modal: true, width: 600, resizable: false, buttons: { Cancel: function() { // Cancel code here }, 'Save': function() { // ...

CSS syntax not for STYLE

I think, CSS syntax and base principles can be very useful, and not only for style. Is there any PARSE engines which can operate with CSS-like rules, like the ones for XML? For example, we can create something like framework (yes, another one), in which we define pages in xml style (JUST EXAMPLE, maybe very stupid or two complicated):...

IE8 Image Map and Position Absolute Issue

Guys, I'm working on a project where I have a image map and when I have a dom object that have a absolute position over that image map area, the image map shines through over some elements. Its really quite bizarre. It only happens over some elements and others its fine. But when it actually shines through I can actually click the to...

How do I pass the image object into the onclick function being assigned to it?

Sorry if that question is confusing, I'm self-learning javascript. I'm dynamically generating image thumbnails and I want to be able to enlarge the image when the user clicks on the thumbnails. My code to create the image tag and assign the onclick function looks like... var imageTag = "<img onclick=\"enlargeImage()\" class=\"thumb\" s...

Set styles per div

Hi, I am new to css and not a programmer. I understand what a class is and I understand what a div is, but what I can't seem to find, is how to set styles per div. Any help appreciated, Joost Verplancke ...

CSS - Float Left and Anchor Element

Hello, I have an anchor element that uses a css class to basically replace the text with an image. I know this sounds odd. But, the end result looks correct (for the most part). .toolLink a { overflow:hidden; } .toolEdit { float:left; background:url(/resources/images/edit.png) no-repeat; width: 15px; height: 1...

How can you tell when a <div> is full of text?

Imagine a website with an element The site wants to run some JS which will fill the div with random text, when the div is full it should clear and start over. Yes I know that sounds weird but the question is, how can the JS know when the div is full, and would start to overflow? By 'full', I mean no more visible text can be put in the ...

How do I disable warnings from Aspx files (HTML,CSS)

All my aspx files give all kinds of annoying warnings like "The CSS Value is not defined" because I'm referencing CSS files from other projects relative to where they will be published in IIS. And other things I ignore like "Zoom is not a valid css property" even though I need it to fix crappy IE 6 rendering bugs. I tried adding Warnin...

How do I uncollapse a margin?

Collapsing margins in CSS: http://www.w3.org/TR/CSS21/box.html#collapsing-margins I understand the purpose of the feature, but I'm trying to do layout, and I can't figure out how to turn it off. The way usually explained in CSS tutorials is to either: Add a border Add a padding All of these have side effects that become obvious whe...

Stacking CSS3 Structural pseudo-classes

While practicing different scenarios in which CSS3 pseudo-classes and selectors might come in handy, I ran across something I just can't figure out! Here's the situation. I want to modify the :first-of-type::first-letter of the first non-empty paragraph for a block of text. I'm not sure that pseudo-classes can be stacked though. Here's ...

How can I get Arial, helvetica and sans-serif working for CSS styled dynamic HTML Textfields in a Flash 9 swf on MacOSX?

How can I get Arial, helvetica and sans-serif working for CSS styled dynamic HTML Textfields in a Flash 9 swf on MacOSX? I'm generating a number of Textfields problematically and I use CSS to style their content. It works just fine when the swf's are viewed in a browser on Windows, but neither in Safari nor Mozilla on MacOSX. I've tri...

How to put text over an image without absolute positioning or setting the image as backbround

Hi, I'm trying to see if it is possible to put some text over an image without using position: absolute or having the image being, the background of an element. The reason for the constraints is that the HTML code is going into an e-mail, and it turns out that hotmail supports neither. I remember that when I first began studying CSS, fid...

Center a dynamic width box

Pseudo HTML <div> <ul> <li>Nav 1</li> <li>Nav 2</li> </ul> </div> I want this to look like [DIV---------------[UL nav1 nav2]----------------------] Instead I get [DIV[UL nav1 nav2-----------padding-------------------]] The li's are left floated. The ul has overflow: auto. How can I get the ul to be as wide as it needs to be,...