.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

extra gap b/w two divs

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :ASP.Net

Hiiiii Coders,

I m using collapsible divs on my page using html, css and javascript. Problem is that whenever i browse my page in opera internet browser.

There is an extra gap b/w my first and second div only. I have four divs on my page. Page is working very much fine on IE,Firefox,Chrome,Safari etc.

Here is my code(html) -

<a href="javascript:animatedcollapse.toggle('elsales')" style="text-decoration: none;">
<div class="mycollapsiblediv" onmouseover="className='mycollapsibledivover';" onmouseout="className='mycollapsiblediv';">  
<h1>My collapsiblediv1</h1>
<div id="elsales" style="background: #D3DEEF; border: 1px SOLID #2F4F4F; display:none;">
<table width="100%" height="100px">
            <td width="60%" align="center" valign="middle" height="100px">
              Sample text1.
            <td width="40%" align="center" valign="middle" height="100px">
            <div style="border: 0;"><a href="http://www.elcomponics.com/s

View Complete Post

More Related Resource Links

divs do not display side by side


I have two divs. I want them to display side by side, on the same row. Using display:inline-block I can do that. But as soon as I position some text in the bottom right corner of div1, the two divs do not have the same vertical position. They are side by side, but the 2nd div starts at the vertical position of the positioned text in the 1st div.   Why would it do that?  Both Chrome and IE8 render it the same way.

( I am doing the nesting of the divs on the left side so that I can position absolutely within a div and not the page. I can't get text to position in the lower right corner of a div any other way. )


  <div style="border:2px solid black;">
    <div style="display:inline-block;">
      <div style="width:10em; height:4em; background:orange;color:White;
        <span style="position:absolute;bottom:0px;right:0px;">
        login message

    <div s

Extra file is included on the Page directive inherits =



I am trying to understand where the additional file name is coming from in my Page directives Inherits

attribute like so :

inherits ="Track_Milestones2, App_Web_techsrvcs_track_milestones2.aspx.cdcab7d2"

Is the result of this app being published on my local server at one time or could this

page have been compiled on a server ?

Thanks for your insights !

TextField control add extra character space at end of it



On one of my publishing page layout i have added Content Field (field of content type) that is

<SharePointWebControls:TextField FieldName="MyName" runat="server"></SharePointWebControls:TextField>
"MyName" is single line text column in the content type.

Then i edit the page which is using this page layout and add one text "Sandip" in that MyName field. Now problem is, this filed show the text on the page but at the end of it, it add space. i.e- "Sandip "

I m not getting why it is showing this.

Please help..!

Regards Sandip Patil Sharepoint Developer http://www.worldofsharepoint.com

gap between inline-block divs


I have two divs, inline-block, width:50%.  When the width is 50% the two divs do not fit on the same line and the browser renders them one under the other.  Change the width to 49% and give them a background color. The divs render side by side, but with a small gap between them. I assume that gap is the reason the 50% width divs don't fit side by side. 

I am trying different combinations of margin:0; padding:0; line-height:0; border:0px;.

How can I make is so there is no gap, horizontal and vertical, between inline-block divs?


		<style type="text/css"> 




<body style="margin:0px; padding:0px;">

<div class="SideBySide" style="background-color:Green;">
<div class="SideBySide" style="background-color:Red;">


Page Header, PrintOnFirstPage=False, HTML render fine, PDF export leaves extra space

As it says in the header.Setup:SSRS 2008, VS 2008 SP1Local Mode, rdlc fileDesign:Make a 1/2" Page header with a text box in it. Set PrintOnFirstPage=FalseBody contains a Table that spans multiple "hard" pages.Results:Renders to HTML in the report viewer just fine.PDF export leaves blank 1/2" at the top of page 1. With no header for page 1, I had hoped it would remove the extra space the same as in the report viewer.Question:Any way to tell SSRS not to leave space when page header is turned off for the first page?Attempts:Tried putting everything in a rectange in the header and set the visibility to false. Still leaves space.

How to center children divs?

I am trying to center children divs which floated left by using margin: 0 auto 0 auto. It did not work. Is there any way to center them?  thanks. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="DIVAlignment.aspx.vb" Inherits="Test_DIVAlignment" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    <title></title>    <style type="text/css" >    #formContainer{     width:600px;          margin:0 auto 0 auto;    }    #formContainer #caption{     font-size: medium;     font-weight: bold;     text-align:center;    }         #formContainer .MetaTitle{      float: left;       margin-left:20px;       width:80px;       text-align:left;       font-weight:bold;       background-color: #cc6633;  &

Collecting extra information using Create User Wizard

 I am trying to collect extra information about a user when the user account is created using the Create User Wizard. This info will be stored in a new table in the standard ASP membership SQL database. I have read several books and loads of online tutorials on the subject and they all take different approaches and seem to make the process hard work. Is there any reason why I can't add an SQL datasource and a number of textboxes  to the wizard step, 'connect' the values from the textboxes to the Insert Parameters and then put an Insert Statement in a suitable event handler to cause the insert? If this is possible what would be the best (ie simplest) way to 'connect' the textboxes to the insert parameters?   Regards Andy

side by side DIVs don't line up on same horizontal line.

the following html is intended to render 2 fixed height DIVs side by side, on the same line. Odd thing is, when I add some text content such as <span>, <p> or <h1>, to one of the divs, that div is drawn down by a varying number of lines. ( depending on the number of lines of block level content. ).  When I duplicate the content in both divs, they snap back up and line up on the same horizontal line. I am getting this behavior in both chrome and IE8.  Is there an explanation? <div style="height:160px; width:200px; display:inline-block;            border:1px solid black;margin:0;padding:0;"><p>line 1</p><p>line 2</p></div> <div style="height:160px; width:200px; display:inline-block;            border:1px solid black;margin:0;padding:0;"></div> thanks,  

Need help to search for extra space in all tables.

Hi, I try to search for data which has some extra spaces in ALL TABLES. Does any one know if there a tool that can do that or the scripts can return all the data (see desire results below). Thank you in advance.  SQL2008. IF OBJECT_ID('Tempdb.dbo.#T1', 'u') IS NOT NULL   DROP TABLE #T1 GO CREATE TABLE #T1 (   FullName   VARCHAR(30) ) GO INSERT INTO #T1 VALUES ('Joe  Smith') INSERT INTO #T1 VALUES ('April Smith ') INSERT INTO #T1 VALUES ('Peter Chen') INSERT INTO #T1 VALUES ('Kristine Nguyen') GO IF OBJECT_ID('Tempdb.dbo.#T2', 'u') IS NOT NULL   DROP TABLE #T2 GO CREATE TABLE #T2 (   FullName   VARCHAR(30) ) GO INSERT INTO #T2 VALUES (' John Smith') INSERT INTO #T2 VALUES ('Lisa Tran ') INSERT INTO #T2 VALUES ('Nicole  Ngo') INSERT INTO #T2 VALUES ('Brandon Lee') GO    SELECT *      FROM #T1;    GO       SELECT *      FROM #T2;    GO -- Desire results. FullName         TableName ---------------- --------- Joe  Smith       #T1   (2 spaces in between) April Smith      #T1   (space after Smith)  John Smith      #T2   (space in front) Lisa Tran  &

Is it suggested to have extra column on the SSISConfigurations SQL Configuration table

Hello, I have all my configurations are saved in SQL Server table. SO I just wanted to know if it is advisible to have extra column on that table? Thanks, Prabhat

T-sql help !!!!! in order to display those extra rows in report....

SiteName SiteID RptSeq     ReportLabel Amount ReconYear     ReconMonth SanAntonioTX 43    1        Aging Prior Month 4763943 2010     8 SanAntonioTX 43 2   Invoices 1542323 2010      8 SanAntonioTX 43 3 Credit Memos -8081.31 2010      8 SanAntonioTX 43 4 Cash Collected - Invoices and Payment on Account -1883460 2010      8 SanAntonioTX 43 5 Katz I/C Payments -174310 2010      8 SanAntonioTX 43 6 NSFs -250 2010           8 SanAntonioTX 43 8 Aging Current Date Selected 4245716 2010      8 Hi My table has these values I need a row where it takes the sum of amount where rptseq <> 8 and rest of ther columns will be same and report label would be SUmOfAmount and there should be another column which wuld be amount of new added row - last row amount where rptseq =8 so these rows i need how is it possible..... please its urgent !!!!!!! if anyone needs extra description please feel free to ask me...

What is the best way to add an extra row to the bottom of a listivew for such things as totals, etc.

 I can add a row to the bottom of a listivew by inserting a table after the layouttemplate in a listview.  It works fine for me to call the added controls from code-behind and chane the control values. Since my listview changes width dynamically depending on the contents of the data, my added table columns don't match up.  I have tried to access the width property of the table and then match the new ones with codebhind, but it doesn't seem to work. I am simply trying to add a row to the bottom of the listview to provide for totals of the columnts.  What is the best way to to that?   Thanks

extra xml attributes in infopath form xml?

I have lot of fields on the form. When I looked at the xml data InfoPath form saves, it looks like: <my:field1>value1<my:field1> <my:field2 xmlns:my="https://schemas.microsoft.com/office/infopath/2003/myXSD/2010-08030T14:37:56">value2</my:field2> Some fields also show attribute xmlns:xsi="......". Why are they not consistent? With the extra attributes, simple XPath query in my Sharepoint workflow to extract values from the xml (I am using http://spdactivities.codeplex.com/) will not work   Any ideas,    

extra column gridview

Dear All; I have a gridview with the following columns pid           Location I would like to add an extra column called quantity, that could be used to get a user input. How do i go about doing that? A sample code will be very helpful. See illustration below pid          Location              quantity   All help will be greatly appreciated. 


Hello, I have these tables....   CREATE TABLE test( codeTest int IDENTITY(1,1), name varchar(100) not null, PCK varchar (15) not null, AK varchar (15) not null, testdate datetime not null, CONSTRAINT testPK PRIMARY KEY (codeTest), );   CREATE TABLE subtest( codeSubtest int IDENTITY(1,1), codeTest int not null, name varchar(100) not null, ps1 int not null, ps2 int, ps3 int, ps4 int, ps5 int, maximumpeek char(1), fullsocketsps1initial int, fullsocketsps2initialfull int, fullsocketsps1final int, fullsocketsps2final int, CONSTRAINT subtestPK PRIMARY KEY (codeSubtest), CONSTRAINT subtestFK FOREIGN KEY (codeTest) REFERENCES test (codeTest) on delete cascade, );   CREATE TABLE scheduler( codeScheduler int IDENTITY(1,1), codeSubtest int not null, ps int not null, step varchar(10) not null, task int not null, cycletime real not null, maxdelay bigint not null, maxexecutiontime bigint not null, maxcycletime bigint not null, lostscans bigint not null, inputtimeouts real not null, outputtimeouts real not null, comments varchar (50), CONSTRAINT schedulerPK PRIMARY KEY (codeScheduler), CONSTRAINT schedulerFK FOREIGN KEY (codeSubtest) REFERENCES subtest (codeSubtest) on delete cascade, );   I want to show, the maxcycletime when task=2 for every test: so this I can do it... SELECT    MAX (scheduler.maxexecutiontime) AS [MAX CYCLE TIME]   ,test.codeTest AS

Removing Extra Padding Around Interactive Sort Arrows

I have a report (using SSRS 2005) which uses Interactive Sorting for all the headings in the table. There appears to be padding around the sort glyphs (arrows) on both the left and the right.  It looks like it is padding about 10px on the left and 10px on the right.  I don't have any setting in my report to explain this.  This means I have to size the text boxes to be a lot larger than they need to be otherwise the heading label wraps to another line. Here's what the text box looks like: ---------------------- | Review Date     ?     | ---------------------- As you can see in my representation there is a lot of padding to the left and right of the sort image. Is there anyway to get rid of this extra padding around the sort glyphs?  I've tried everything I can think of.  If not, can I keep the heading labels from wrapping?  I've tried non-breaking spaces but they still wrap to the next line. Thanks in advance, -- John...

ModelState has an extra key which is empty ?

Hi everybody, I created a Model to do registration on my Website, and add some validations to it. When the user inputs a data, the data will be checked for validity using ModelState.IsValid. But when I input a correct data, it always be invalid. So I decided to debug my program and found that there are an extra key in my ModelState.For my model, I have UserName, Email, Password, ConfirmPassword, SecretQuestion and SecretAnswer (6 elements)But when I debug, in ModelState, I found 7 elements, they are UserName, Email, Password, ConfirmPassword, SecretQuestion SecretAnswer and the last one is "".I don't know why there is an extra "" in my ModelState, and I checked that it was the source of my error. Does anybody know why it appears and how to fix it ?Below I enclose my source to make it clearer [PropertiesMustMatch("Password", "ConfirmPassword", ErrorMessage = "The password and confirmation password do not match.")] [PropertiesMustNotMatch("UserName", "Password", ErrorMessage = "The username must not be the same as password.")] [PropertiesMustNotMatch("SecretQuestion", "SecretAnswer", ErrorMessage = "Secret question must not be the same with secret answer.")] public class RegisterModel { [Required] [DisplayName("User name&quo
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend