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


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

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

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :ASP.Net
 
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,  


View Complete Post


More Related Resource Links

Mysterious gray line when two rectangles are side by side

  

Hello, I am new to the WPF and have a small, but extremely annoying problem.   There appears to be some sort of gray line that appears when I put two rectangles side by side.  Only during certain window sizes does this line appear, I assume this has something to do with the rendering and having an odd # of pixels or something, not really sure.   But this is unacceptable for what I am trying to accomplish, so, I am hoping to get some assistance here please, please review this XAML and when you run it .. you will see that as you change the window to various sizes between my two black rectangles you will notice a gray line that appears and disappears depending on what size the window is.

Thank you,

Mike

 

PS. I am using MS VS 2008 and have tested this on XP and windows 7, and found the same problem in both platforms.

 

Code:

<Window x:Class="Window1"
  xmlns="http://schemas

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. )


thanks,

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

    <div s

Hide background horizontal line in Chart

  
Hello, I am using SSRS 2008.  I have a simple question which i hope someone might be able to help me with. I have a series chart The chart area has horizontal lines for which i see no option to hide or remove before report rendering.  Is there a way to control this so that my chart can have a blank background look.   Regards

How can I set the Horizontal Property of a line dynamically

  
Is there a way to set the Horizontal property of a line dynamically? I tried to put an expression on the Horizontal endpoint textbox but it produces an error.  It said "... cannto be parsed as a unit because it does not contain numeric values..."  I hope anyone would help me. Thank you!  

Horizontal Bar Chart and Overlaying Line Chart

  
I am using SSRS 2008 and developing my reports in BIDS.

I have a report with two data points. I want to chart the first as a bar (horizontal) chart and then the second as an overlaying line chart.

I created both data series, originally, as a bar chart. I have clicked on the second series in the "Drop Data Fields Here" area and changed the chart to a line chart. When I do that, it changes both series to a line chart.

However, if I use the column (vertical) chart for the first series, it will let me make the second one a line chart.

Is this a limitation of SSRS 2008? Can I not have one data point be the horizontal bar chart and the second one a line chart?

If so, are there any suggestions how to get around this?

Thanks.

Listbox question horizontal line

  

Is it possible to display the items you add in a listbox horizontally instead of vertically? Now I have a result like this:

Item 1:

Item 2:

Item 3:

But I want a result like this:

Item1, Item2, Item3

I use listbox.Items.Add(variable name) to put the items in the box together with a for loop.


call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

Use jQuery and ASP.NET AJAX to build a client side Repeater

  
By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side

Client Side Gridview Pagination using JQuery

  
I would like to show how to use Client Side Gridview Pagination using Jquery Table Pagination Plugin by using Ryan Zielke.

Use jQuery and ASP.NET AJAX to build a client side Repeater

  
By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.

To that end, I'm going to walk you through these four steps to effectively implementing a client side Repeater, using ASP.NET AJAX and jQuery:

Use jQuery and ASP.NET AJAX to build a client side Repeater

  
By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.

Accessing SharePoint 2010 Data with Server-Side APIs

  
Accessing SharePoint data in server-side solutions is one of the most common tasks that you will perform as a SharePoint developer. SharePoint 2010 provides powerful server-side APIs that enable you to retrieve, add, edit, and delete SharePoint data programmatically. SharePoint 2010 also includes the new LINQ to SharePoint technology that enables you to work with SharePoint data efficiently and easily.

Adding Client-Side Confirmation When Deleting

  
The JavaScript confirm(string) function displays its string input parameter as the text inside a modal dialog box that comes equipped with two buttons - OK and Cancel (see Figure 1). The confirm(string) function returns a Boolean value depending on what button is clicked (true, if the user clicks OK, and false if they click Cancel).

Server side validation of Fileupload control not working

  
 

 


I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.


Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
       

' Get file name

        Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload)

        Dim UploadFileName As String = uploadAvatar.PostedFile.FileName

        If UploadFileName = "" Then
            ' There is no file selected
            args.IsValid = False
        Else
            Dim Extension As String = UploadFileName.Substring(UploadFileName.L

Article commenting by line number

  

I'm wondering what's the best way to approach an online article system that allows users to comment by clicking on the line they are commenting about? Essentially the same way Adobe Acrobat works with comments where you can click anywhere and the text is saved for that location.

I'm assuming a mix of jQuery would be the crux of the interface. The system would need to save comments so that when another user logs in, they will also see the other comments but they can´t edit them - only add their own.

Any suggestions would be great.


New off line application working with sdf file. Need advice

  

Hey Folks


I am working on a project currently where I need to get data out of a 3rd party vendor's software that uses a .sdf file I looked this up and its a SQL CE file. I was hoping to just link to with with access but thats apparently not going to happen. I need to link to the database extract data from it to a csv file for later use. I also and most important I need to get the data from it and create a report that can be printed while on a customers site that my or may not have web access so I need for this program to be on and off line. I had my webapplication that I have been working on open and was able to bring up the sdf file under the server exploere however I can't seem to get anything out of it when I try to do grid views or detail views errors out.


Can I use one of Visual Studio projects to create this sort of applicaiton if so what would be the best approach. I would love to get an access odbc driver since office is allready installed on the employee's laptop's


Thanks

Capjlp



Categories: 
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