<html>
<body>
<script language="javascript">
function getSelectionHTML()
{
var div = document.getElementById("myDiv");
if (document.createRange) {
var textNode=div.firstChild;
var rangeObj=document.createRange();
rangeObj.setStart(textNode,0);
rangeObj.setEnd(textNode,5);
div .innerHTML =...
I have a simple problem with an image going under text, rather than beside it.
Markup is like this:
<div class="footer">
<p>bla bla bla bla</p>
<a href="url_here" class="next" title="Next"><span>Next</span></a>
</div>
CSS is like this:
div.footer p {
color: #FFF;
width: 80%;
margin: 0 auto;
padding:0;
b...
I have followed every single piece of advice I have found to try to get this to work but all of it has been to no avail. Can someone tell me why my description/thumbnail doesn't show up? Thanks. Below is my code and the link to the site:
Meta Tags:
<meta name="title" content="La Vita è Bella, because life is beautiful" />
<meta name="d...
Does a div element not have , an onscroll event handler ?
The behaviour on my page, doesn't seem to indicate the div onscroll eventHandler is recognized.
<div id='bd' onscroll='alert('Scroll Called');'></div>.
Also,
Do div scroll events roll up to window scroll events, as per DOM event bubbling ?
...
I've just run the homepage of a site I'm working on through the w3c HTML validator and it's come back with 3 errors and 2 warnings. I've taken a look at them but can't see why they would be causing a problem. I've pasted them in below (I've removed URL's/strings etc as the site isn't quite ready to be made public yet). This is being v...
Already checked exisitng questions for this, but didn't find an exact match.
My aim is to replace characters (like spaces) on a webpage with a small image using css.
Example:
<p><span>This is a text</span></p>
becomes:
<p><span>ThisIMGisIMGaIMGtext</span></p>
(where IMG stands for a visible image (middot-pic for a space f.e.))
I...
I have some JQuery code that shows or hides a div.
$("div#extraControls").show(); // OR .hide()
I initially want the div to be not visible so I used:
$(document).ready(function() {
$("div#extraControls").hide();
});
However, on the browser, the content loads visible for a second before disappearing, which is not what I want.
...
What I am trying to do is open up a JFilechooser that filters jpeg,gif and png images, then gets the user's selection and inserts it into the JEditorPane. Can this be done? or am i attempting something impossible? Here is a sample of my program.(insert is a JMenuItem and mainText is a JEditorPane)
insert.addActionListener(new ActionList...
I've some html text like
<h1>GreenWhiteRed</h1>
Is it SEO friendly to split this text in something like
<h1><span class="green">Green</span><span class="white">White</span><span class="red">Red</span></h1>
Is the text still ranking well and is it interpreted as a single word 'GreenWhiteRed'?
...
Hi,
I'm trying to set focus on a text box which generated in the following way:
<%=Html.TextBoxFor(model => model.Email, new { style = "width:190px;Border:0px", maxsize = 190 })%>
i tried to use javascript which didnt help much.
var txtBox = document.getElementById("Email");
if (txtBox != null) txtBox.focus();
...
I am working on a new home for my browser.
When the src changes of the iframe (click search or something) I want to leave my site and go to where the iframe is going. How do I do this?
edit:// example: http://imgur.com/OvnCz.jpg
...
Hi, I am trying to disable some inputs using jQuery 1.4.2, This is a part of the HTML code:
<input type="text" disabled="disabled" name="nume" value="Text" />
And jQuery:
$('.salveaza').live('click', function(e){
$.get(ajaxURL, $('form', itemCurent).serialize()+'
// This is the code for disabeling inputs
...
I'm trying to find some simple client-side performance tweaks in a page that receives millions of monthly pageviews. One concern that I have is the use of the CSS universal selector (*).
As an example, consider a very simple HTML document like the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
...
I have a list of phone extensions that I want to print a friendly version of it.
I have a print css for it to print appropriately onto paper, the extensions are located within an unordered list, which are floated to the left.
<ul>
<li>Larry Hughes <span class="ext">8291</span></li>
<li>Chuck Davis <span class="ext">3141</span></li>...
How do I set the option selected in a jumpmenu when using a dwt template to create the menu on multiple pages?
Currently. when I change the page, it always restores back to the initial option (page 1), even when I have 'restore' set to 0. What I want it to do is stay at what I selected, even after it changes the page (ie. when I select...
Hi,
I'm looking at the buttons used on twitter's home page, specifically the big orange 'signup' button. I see it is defined like this:
<p id="signup-btn">
<a id="signup_submit" href="/signup">
<span>Sign Up</span>
</a>
</p>
are they just using css to give the orange button appearance (which may just be a jpg), and al...
Hi everyone,
I need a bit of help applying a drop shadow image to a range of DIV elements. The elements in question already have a background image so I am wrapping another DIV around them. Things get complicated further because I'm also using the 960gs CSS framework.
This is my current HTML for a content box type display:
<div class...
Hello,
I am working on a Javascript WYSIWYG editor in Firefox. I am using a div with the contenteditable attribute set to true in order to accomplish this (I cannot use a contenteditable iframe for this particular project). This contenteditable div is nested in another div that is not contenteditable. I am encountering the following t...
Is it possible to style the option elements of a select list/dropdown beyond background and font? I'm specifically looking to add some padding/margins so the list isn't as cramped.
...
My links correctly open a new window when using IE8, but when I use firefox or chrome they just open a new tab.
I am using the code target="_blank" for my links.
How do I fix this so it opens a new browser window and not just another tab?
This fix needs to be for everyone that views the page and not just for my personal use.
...