|
I'm working on my mobile, so apologies in advance for the lack of formatting / example code.
In principle it's pretty simple, once you know how:
1. Create a div as a container.
2. Into the above place three divs left,right and middle in that order
3. Using CSS float the left div left and the right div. ALSO set the widths
4. Using CSS set the left margin and right margin of the middle div so
it doesn't run round the divs on the edge.
You might also need to Google cleafix if you want to support other browsers.
A round up of the above can be seen here:
http://css.maxdesign.com.au/floatutorial/tutorial0915.htm
|
|
|
|
|
Thanks for solution.
But no use.
Cause when i dont have anything in left div the content div's width should increase ( i mean it should take the left div with too).
Please Help !
|
|
|
|
|
CSS sibling selectors will help. You might even be able to use the general sibling combinator[^]:
<div class="wrapper">
<div class="left-column">
Left column content.
</div>
<div class="right-column">
Right column content.
</div>
<div class="main-column">
Main column content.
</div>
</div>
.left-column
{
float: left;
width: 120px;
}
.left-column ~ .main-column
{
margin-left: 120px;
}
.right-column
{
float: right;
width: 120px;
}
.right-column ~ .main-column
{
margin-right: 120px;
}
.wrapper:after
{
content: "";
display: table;
clear: both;
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks All!
But i wanna somthing like this :
<div style="width: 100%;">
<div style="width:15%;float:right"><asp:TextBox runat="server" Width="120px"></asp:TextBox></div>
<div style="float:right;width:100%"><asp:TextBox ID="TextBox2" runat="server" Width="100%"></asp:TextBox></div>
<div style="width:15%;float:left"><asp:TextBox ID="TextBox1" runat="server" Width="117px"></asp:TextBox></div>
</div>
and user can remove center texbox in settings and it will be like this :
<div style="width: 100%;">
<div style="width:15%;float:left"><asp:TextBox runat="server" Width="120px"></asp:TextBox></div>
<div style="float:left;"><asp:TextBox ID="TextBox2" runat="server" Width="100%"></asp:TextBox></div>
<div style="width:15%;float:left"></div>
</div>
Now Center div should take the left div width too.
Example 2 :
first i have :
<div class="wrapper">
<div class="left-column">
<asp:TextBox ID="TextBox1" runat="server" Width="100%">Left</asp:TextBox>
</div>
<div class="right-column">
<asp:TextBox ID="TextBox2" runat="server" Width="100%">Rigth</asp:TextBox>
</div>
<div class="main-column">
<asp:TextBox ID="TextBox3" runat="server" >content</asp:TextBox>
</div>
</div>
and the user can change remove the left textbox in left div :
<div class="wrapper">
<div class="left-column">
</div>
<div class="right-column">
<asp:TextBox ID="TextBox2" runat="server" Width="100%">Rigth</asp:TextBox>
</div>
<div class="main-column">
<asp:TextBox ID="TextBox3" runat="server" >content</asp:TextBox>
</div>
</div>
Now the center div should "Stretch".
|
|
|
|
|
hi , im sorry for the subject name i didnt found sth else to write it to .
i have two forms , master page/form and default page/form .
when i run the website some of the element in the default page are not correct . i mean is like i didnt defined any css property for it .
but i figure out sth , when im using the id for a particular element and the element is type of asp not html i mean start with <asp:element name="" runat:server="" id="button">
if i set a css for it with an id
like
#button {sth,sth,sth}
is not work pretty fine in the default page .
but if i used the class and internal css for that element . is work pretty fine.
look at this
<asp:element name="" runat:server="" class="button" id="button">
.button{sth,sth,sth}-------------->> it works pretty fine in the default
and this one too
<asp:element name="" runat:server="" style="sth,sth,sth" id="button">
but is not working fine with the id . i dont know why.
i dont know if this place is the right place for asking this type of qustion or not.
but i'll appreciate if you suggest me any thing that help me out.
and i'm sorry for my poor english.
|
|
|
|
|
You are correct the style sheets for element id seems to not work. This is because asp controls are by default renderend with name and id attributes set to unique values.
As a result you don't have to worry about having <asp:button id="Button"> on master page, content page and 3 copies of the same user control - they all will get different id, avoiding problems with html validation and event handling.
If you absolutely have to use css with id and you know 100% there will be no other control with the same ID, you can set ClientIDMode="static", however I would encourage using css class instead (set with "CssClass" attribute for asp controls, not "class" as in your example".
On final note, you can check exact id and other properties of rendered page using F12 tool in most browsers.
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
I have design on crystal report e.g. myreport.rpt.
and i am passing parameter at runtime from aspx page to this report but it is not showing message;
"The report you requested requires further information."
Server name:
Database name:
User name:
Password:
Use Integrated Security
but I have added this information when reportDocument is generated.
i.e.
ReportDocument objRpt = new ReportDocument();
objRpt.FileName = Server.MapPath("~/Report/myreport.rpt");
objRpt.SetDatabaseLogon("root", "", "localhost", "test");
objRpt.SetDataSource(Ds);
objRpt.Load(objRpt.FileName);
plz help me
|
|
|
|
|
Page which trying to access requires security permission....it May be Folder Rights or Permission issues
|
|
|
|
|
how to convert Div.innerHtml to image format in VB.Net.It contains image,textbox and checkbox also.....
thanks
|
|
|
|
|
Start from here: Generating ASP.NET Images on the Fly Article[^]
Sample:
Dim oBitmap As Bitmap = New Bitmap(468, 60)
Dim oGraphic As Graphics = Graphics.FromImage(oBitmap)
Dim oColor As System.Drawing.Color
Dim sColor As String = Request("BackgroundColor")
Dim sText As String = Request("Text")
Dim sFont As String = Request("Font")
Dim oBrush As New SolidBrush(oColor)
Dim oBrushWrite As New SolidBrush(Color.White)
oGraphic.FillRectangle(oBrush, 0, 0, 468, 60)
DrawString(String, Font, Brush, FPoint)
Dim oFont As New Font(sFont, 13)
Dim oPoint As New PointF(5F, 5F)
oGraphic.DrawString(sText, oFont, oBrushWrite, oPoint)
oBitmap.Save(Server.MapPath("generated_image.jpg"), ImageFormat.Jpeg)
//Response.Write("View the generated image <a target=""_blank"" href=""generated_image.jpg"">here</a>")
Response.ContentType = "image/jpeg"
oBitmap.Save (Response.OutputStream, ImageFormat.Jpeg)
|
|
|
|
|
i'm the beginner with crystal report!!!!
can anybody help me for generating crystal report?
i'm having problem like OLE DB (ADO) in that no items found ?
please help me ASAP!!!
|
|
|
|
|
|
Hi Experts,
I develop a small web application also i have hosted the server.
But i open the the url in the mobile browser is not in the formatted order as see in the PC browser.
Please help me.
Thanks,
Murugavel S
|
|
|
|
|
Murugavel Sadagopan wrote: But i open the the url in the mobile browser is not in the formatted order as see in the PC browser.
You have to consider the screen space availability of mobile and design accordingly. Following W3C standards, you can develop UI that will be compatible across browsers.
If you have some fixed width as per pc browser, it will have an affect on mobile.
Look here for various answers for similar question asked here: Similar question asked here[^]
Few more helpful links:
Browser Compatibility Application[^]
doubt regarding browser compatability[^]
|
|
|
|
|
You should give a try to bootstrap as your css. It provides Cross platform support, which eliminates major layout inconsistencies. Some of the benefits it provide are:
-12-Column Grid, fixed layout, fluid or responsive layout.
-Base CSS for Typography, code (syntax highlighting with Google prettify), Tables, Forms, Buttons and uses Icons by Glpyhicons .
-Web UI Components like Buttons, Navigation menu, Labels, Thumbnails, Alerts, Progress bars and misc.
-Javascript plugins for Modal, Dropdown, Scrollspy, Tab, Tooltip, Popover, Alert, Button, Collapse, Carousel and Typehead.
Below id the url to get examples and code :
http://twitter.github.com/bootstrap/[^]
Cheers by,
Anand Ranjan
|
|
|
|
|
Hi all,
I need to convert from HTML to PDF in asp.net.I called one HTML file from local server and load on a "div" control.This HTMl format contains some controls like Textbox,checkbox and object.when convert to PDF format i want to display these controls also in PDF.but i need to do without any(PDF conversion s/w).anybody knows this..share to me......
Thanks all,
|
|
|
|
|
I am trying to backup outlook pst while it is open but cannot backup pst...using vb.net
Please Give some help......in vb.net
|
|
|
|
|
mayur darji wrote: I am trying to backup outlook pst while it is open but cannot backup pst...using vb.net
Not just by code, you cannot create a copy of PST even manually (do copy-paste) if it is open in Outlook.
AFAIK, it's as per design and you need to close outlook to take backup of PST.
|
|
|
|
|
Hi All,
I develop a application with grid view. I have bind the values in gridview view (5 records).
in Gridview, I want 4th row in red color
and 5th row in green color.
Plz help me.
Thanks,
Murugavel s
|
|
|
|
|
You can do it on RowDataBound Event. Like This :
protected void Grd_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow && e.Row.RowIndex == 4)
{
e.Row.Style["Color"] = "Red";
}
else if (e.Row.RowType == DataControlRowType.DataRow && e.Row.RowIndex == 5)
{
e.Row.Style["Color"] = "Green";
}
}
}
|
|
|
|
|
Read about gridview event RowDataBound
You get access to grid's row at the time of bind. Based on the need, you can set styles and make changes in row. Try out.
|
|
|
|
|
Good morning, I would like to use the library MORRIS.JS with ASP. Net, I know I must be a JSON object, but not how to do it, someone help me? As an example if I do a query on a database and want to send the data in JSON format so the library becomes MORRIS.JS the graph, can someone give me a simple example? Thanks to this community and sorry my English is not very good, I would say that is bad enough, but I will understand!
Linkt to library http:
can someone give me a practical example? aspx file ... the. js and the sharp c if necessary. My question is not how to use this library, that is not passing data obtnega a query, to give an example, and once I have the results of the query, pass them morris.js to make a statistical graph perform the query. Anyone is encouraged to give me a practical example? In other forums ... I received answers, but very generic saying just theory, but would like to see something practical! .... Thank you all!...
|
|
|
|
|
Please avoid crosspost[^] - it is considered rude.
Pick a forum and stick to it.
|
|
|
|
|
No interpreter was a crosspost, I thought that the consultation was not visible as a forum as visited, did not get any satisfactory answer, thanks
|
|
|
|
|
Hello CodeProject Community, was wondering if you could help me with a GridView issue.
My goal is to fetch all unique/distinct values in a GridView. In this case, I'm trying to get all unique ProductCode.
My example GridView:
OrderID | ProductCode | Desc | Qty
001 | PC01 | Books | 1
002 | PC02 | Computers | 1
003 | PC03 | Bag | 1
004 | PC01 | Books | 3
005 | PC03 | Bag | 2
Thank you in advance.
Tags: VB.Net, ASP.Net, GridView
|
|
|
|