if IDE by default adding ; at end. should i remove?
selector {property:value;property:value;property:value;property:value;}
I read on an article semicolon not required at end.
Suppose I have markup as setup
http://jsfiddle.net/ADxne/
Currently drop downs look like
To solve the 1st problem, I could add a margin-top to child ul's to compensate for padding in list items http://jsfiddle.net/ADxne/1/
.horMenu > li > ul {
margin-top: 10px;
}
but for the 2nd problem without a fixed width list or list items, is there a way to position the sub menu to the right of the list item? Or is the only way to set a fixed width? http://jsfiddle.net/ADxne/2/
hi,
I'm getting crazy with some browsers fixes to do everytime I'm doing a new website. For example, lately I've built my own Flash Video Player and I lost hours to fix some problems such as aligning it in IE and Firefox and Safari.
Would be so cool to have a intermediary layer, I could use to design my website, without taking care of all browsers fixes...
I guess I'm a dreamer
I want to change the background color of in-viewport elements (using overflow: scroll)
So here was my first attempt:
http://jsfiddle.net/2YeZG/
As you see, there is a brief flicker of the previous color before the new color is painted. Others have had similar problems.
Following the HTML5 rocks instructions, I tried to introduce requestAnimationFrame to fix this problem to no avail:
http://jsfiddle.net/RETbF/
What am I doing wrong here?
Hello,
I'm using (trying to use) jQuery to add a class to the first paragraph of every div with class of ".djBio" My problem is that it's only adding the class to the first div.djBio, not all divs with that class. Here's the code. I am also using the fancy letter jquery plugin to add the drop cap to the first paragraph (which also is only applying to the first div.djBio, not all)
jQuery(function( $ ){
$('.servicesContent p:first, .about-usContent p:first, .djBio p:first').fancyletter().addClass('firstP');
});
Thanks so much for your help!
Hello!
I have the following t-sql code which generates an error
Declare @table TABLE
(
ID1 int,
ID2 int
)
INSERT INTO @table values(1, 1);
INSERT INTO @table values(2, 2);
INSERT INTO @table values(3, 3);
DECLARE @field varchar(50);
SET @field = 'ID1'
DECLARE @query varchar(MAX);
SET @query = 'SELECT * FROM @table WHERE ' + @field + ' = 1'
EXEC (@query)
The error is Must declare the table variable "@table".
What's wrong with the query. How to fix it?
I'm wanting to be able to create a banner of floating images based on what are uploaded via users. The tool needs to have images of 50x50 and 100x100. At the moment, I just want to randomly display the images and tried to apply float:left. However, as you can see below - it leaves gaps.
Is there an easy way to do this without programatically positioning the images?
If you want the code so far, it's here:
.wall {
width: 300px;
background-color: red;
display: table;
}
.wall img {
float: left;
}
and
<div class="wall">
<img src="man1.png" alt=""/>
<!-- ETC... !-->
</div>
Hello....I have a report with 12 Tablixes on it. The user can pcik and choose which one of these Tables and their associated data shows when the Report is generated. However, when chosing a subset of the 12 tables, the report shows blank space where I hide the non-selected tablse. Is there any way to make the report resize/fit the size of the selected tables...truncating the white space where the invisible tables are?
Thanks
Hello,
I want to center a div, but the general way is
#selector{position:relative;margin:0px auto;}
What exactly is wrong below
#crp{top:40%; position:absolute; margin:auto;}
The Div below is not nested but a standalone. The #crp is going to the extreme right.
<div id="crp">...something goes here....</div>
Thanks
Jean
I'm having to issues lining up items properly in my html code. I am not sure why they are lining up the way I want them to.
First the header My Color Library is a full line height above the horizontal ruler. I want it right above the ruler.
Second my X box in the td with the background is justified right fine but I actually want it in the top right hand corner not centered vertically.
Here's some example html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>FunctionalColor&Design</title>
</head>
<html>
<body>
<table style="width=900px; margin-left: auto; margin-right: auto;">
<tr>
<td>
<P>
<div style="font-size: 1em; line-height: 1em; font-weight: bolder; padding: 0px;">My Color Library</div>
<div align="right" class="removeall">
<a href="colors">
<img src="http://2100computerlane.net/workingproject/images/x-button.png" />
<bold>Remove All</bold>
</a>
</div>
<HR/></p>
<div class="mycolor">
<table><!--width="900px" -->
<tr>
<td style="border: none; background-color: #f8d3cf; width:125px; height:80px; border-spacing: 10px; padding:0;">
<div style="padding:0; vertical-align:top;" align="right" class="remove">
<a href="f8d3cf" style="padding: 0px;">
<img src="http://2100computerlane.net/workingproject/images/x-button.png" style="padding: 0px;"/>
</a>
</div>
</td>
<td style="border: none; width:10px;"></td>
<td style="border: none; background-color: #f8d3cf; width:125px; height:80px; border-spacing: 10px; padding:0;"></td>
<td style="border: none; width:10px;"></td>
<td style="border: none; background-color: #f8d3cf; width:125px; height:80px; border-spacing: 10px; padding:0;"></td>
<td style="border: none; width:10px;"></td>
<td style="border: none; background-color: #f8d3cf; width:125px; height:80px; border-spacing: 10px; padding:0;"></td>
<td style="border: none; width:10px;"></td>
<td style="border: none; background-color: #f8d3cf; width:125px; height:80px; border-spacing: 10px; padding:0;"></td>
<td style="border: none; width:10px;"></td>
<td style="border: none; background-color: #f8d3cf; width:125px; height:80px; border-spacing: 10px; padding:0;"></td>
<tr>
<td style="border: none; font:.6em Arial, Helvetica, sans-serif; width:125px; height:20px;">Desert Warmth<br/>70YR 56/190 A0542</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
I have 5 list items that act like tabs for a page stored in a Masterpage in a asp.net application. When the user selects a list item, I would like to redirect the the page, and change the class for that list item (tab) to show the active tab the user is on. What is the best way to dynamically change the class of the list item based on the user interaction with them, and maintain the state?
I have a WebBrowser control that is created and added to the form during run-time.
How do I connect this control to subroutine that can handle its events at run-time?
Hi people,
I am working on a website curently. Here is the link for it.
Good News : The site is fine on FireFox, Chrome and IE 8.
Bad News: It is not fine on IE 7. Alignment problems, hyperlink colour problems, etc.
What should i do to make things normal on IE7 too.
Any amount of help would be appreciated.
Thanks
Hi there. I've got quite big trouble, because i need to anathematise from styling some input types. I had something like:
.registration_form_right input:not([type="radio")
{
//Nah.
}
But i don't want to style checkboxes too.
I've tried:
.registration_form_right input:not([type="radio" && type="checkbox"])
.registration_form_right input:not([type="radio" && "checkbox"])
.registration_form_right input:not([type="radio") && .registration_form_right input:not(type="checkbox"])
How to use &&? And I'll need to use || soon, and I think that usage will be same.
Thanks.
I've been developing a web app for a few weeks now and ended up with about a 1000 lines. I am sure not all the selectors are being used and am trying to clean it up. At the same time, I don't want to do it manually for obvious reasons.
Is there a safe and an efficient way to remove unused selectors? For this, am I supposed to navigate the entire website to let it know which selectors are not being used? (I use javascript to add some selectors so these might not show up until a particular usecase is seen)
In an "edit article" page i have a select list which displays author first and last name, as well as authorId as the value. As well as the article context and headline and so on (fetched with a different method) - though this method also holds the authorId of the specific article.
I need to have the Author of the Article selected in the option list, instead of it defaulting to the first option in the select list.
what i have:
echo'';
//loop through author names in option list $authors_name
foreach($authors_name as $nameRow){
echo'<option class="authorId" value = "' . $nameRow['AuthorID'] . '">'. $nameRow['FirstName'].'
'.$nameRow['LastName'] .'';
}
echo'</select>';
and the jquery:
var currID = ('#selectAuthor').val();
if(('.authorId').val() == currID){
$('.authorId').addClass('new_class')
$('.new_class').prop('selected',true);
}
OR
var currID = ('#selectAuthor').val();
if($("select option[value=currID]").attr('selected','selected'));
Any help would be greatly appreciated, I hope what I am trying to do is clear.
Thanks in advance
I have simplified it with just regular input and checked it in jsfiddle.net
here is the HTML
';
<option value = "2">Name val 2</option>
<option value = "5">Name val 5</option>
<option value = "1">Name val 1</option>
and here is the jquery
var currID = $('#selectAuthor').val();
if($("select option[value='+currID+']").prop('selected',true));?
and even then it doesn't apply selected="selected" to option with value="1"
I created a Linq-to-SQL DBML for the first time. I dragged and dropped all my tables over to the designer. The tables all appear in the designer.cs file. In Global.asax, I also have model.RegisterContext() with the ScaffoldAllTables = true option. The routes are also setup.
I can pull up the Scaffolding page, but there's at least one table that is missing that I'm trying to get to show up. This missing table has a relationship with a child table that references it. The child table appears. When viewing data for the child table, the column that references the missing/parent table shows the numeric PK int value, rather than showing the "name". So instead of showing "Cars" it shows 1, and instead of showing "Planes" it shows 2, etc.
There's another table in the DB that has the same type of structure as the missing table, and it is correctly appearing in the scaffolded tables.
For this missing table, I've tried explicitly adding the ScaffoldTable attribute to no avail.
Does anyone know what would cause a table like this to not appear in the list Scaffolded tables? Thanks very much.
Hi All,
I have a small flex application.
What I want to achieve is, I want my user to pass the script as a parameter. so he has the flexibility to do anything with the buttons-like add event, hide the other buttons.
Something like this(below)
<param name="script" value="import flash.events.Event;\n private function printMessage(event:Event):void {\nmessage.text += event.target.label + " pressed" + "\n";\n}">
Thanks.
I'm building a Drupal theme up and want to know if there is a Drupalish way to add a css file only if the user has js turned off.
This would ideally go in the theme.info file to keep it neat!
Something like this would be ideal:
conditional-stylesheets[if no javascript][all][] = nojs.css
If this isn't possible then I'm going to keep all the css that needs JS out of the css files, and add it dynamically using JS but this seems a bit messy...
Any ideas?
I've noticed many sites are able to use a username or page title as an action. How is this done?
For example instead of www.example.com/users/my_username (where the users action is generic and responsible for fetching user data) how could I make this www.example.com/my_username?
Thanks very much.
It seems that padding style applying to <td /> doesn't work on IE7 in my computer, but is okay on FireFox3.5.
Is this a correct behavior? Or I get wrong.
Thanks.
Hi,
i have this page:
login: [email protected]
password: m
I want to have the string "Editar mi perfil" aligned on the right, so i have added:
text-align: right
but it doesn't work,
I have tried also:
float:right
It works but goes a bit upper than I want.
Any idea?
Regards
Javi
I am trying to get a form's textfield to dynamically appear based on a radio checkbox selection.
For example, on my form...there is a radio button that ask "Do you want to enter your age?" with an option to check YES or NO.
If the user check YES, a textfield dynamically appear after this so the the user can enter his or her age. If user check NO, then nothing happen.
How do I begin to do something like this? Just looking for any feedback I can get. Thanks!