Search Results

Search found 673 results on 27 pages for 'alignment'.

Page 5/27 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How does sizeof calculate the size of structures

    - by Gearoid Murphy
    I know that a char and an int are calculated as being 8 bytes on 32 bit architectures due to alignment, but I recently came across a situation where a structure with 3 shorts was reported as being 6 bytes by the sizeof operator. Code is as follows: #include <iostream> using namespace std ; struct IntAndChar { int a ; unsigned char b ; }; struct ThreeShorts { unsigned short a ; unsigned short b ; unsigned short c ; }; int main() { cout<<sizeof(IntAndChar)<<endl; // outputs '8' cout<<sizeof(ThreeShorts)<<endl; // outputs '6', I expected this to be '8' return 0 ; } Compiler : g++ (Debian 4.3.2-1.1) 4.3.2. This really puzzles me, why isn't alignment enforced for the structure containing 3 shorts?

    Read the article

  • Need help with Android TableLayout alignment

    - by Ben L.
    I'm trying to build a calculator layout using TableLayout, but the last two rows aren't aligning with the rest of the layout. Is there something wrong with my layout XML? What I'm trying to do would be easier to accomplish in HTML (<td> with colspan or rowspan), so should I try converting this into a WebView? Code is as follows: (Screenshot) <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <EditText android:id="@+id/EditText01" android:layout_height="wrap_content" android:layout_width="fill_parent" /> <TableLayout android:layout_height="fill_parent" android:layout_width="fill_parent" android:stretchColumns="*"> <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1"> <Button android:id="@+id/Button08" android:textSize="16pt" android:text="^" android:layout_weight="1" android:layout_height="fill_parent" android:layout_width="wrap_content" /> <Button android:id="@+id/Button09" android:text="÷" android:textSize="16pt" android:layout_height="fill_parent" android:layout_weight="1" android:layout_width="wrap_content" /> <Button android:id="@+id/Button10" android:text="×" android:textSize="16pt" android:layout_height="fill_parent" android:layout_weight="1" android:layout_width="wrap_content" /> <Button android:id="@+id/Button11" android:textSize="16pt" android:text="-" android:layout_weight="1" android:layout_height="fill_parent" android:layout_width="wrap_content" /> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="2"> <LinearLayout android:layout_width="wrap_content" android:layout_height="fill_parent" android:orientation="vertical" android:layout_weight="1"> <Button android:id="@+id/Button01" android:text="7" android:textSize="16pt" android:layout_weight="1" android:layout_height="wrap_content" android:layout_width="fill_parent" /> <Button android:layout_height="wrap_content" android:textSize="16pt" android:text="4" android:id="@+id/Button05" android:layout_weight="1" android:layout_width="fill_parent" /> </LinearLayout> <LinearLayout android:layout_height="fill_parent" android:orientation="vertical" android:layout_weight="1" android:layout_width="fill_parent"> <Button android:id="@+id/Button02" android:layout_height="wrap_content" android:text="8" android:textSize="16pt" android:layout_weight="1" android:layout_width="fill_parent" /> <Button android:layout_height="wrap_content" android:textSize="16pt" android:text="5" android:id="@+id/Button06" android:layout_weight="1" android:layout_width="fill_parent" /> </LinearLayout> <LinearLayout android:layout_height="fill_parent" android:orientation="vertical" android:layout_weight="1" android:layout_width="fill_parent"> <Button android:id="@+id/Button03" android:text="9" android:textSize="16pt" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" /> <Button android:textSize="16pt" android:text="6" android:id="@+id/Button07" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" /> </LinearLayout> <Button android:id="@+id/Button04" android:text="+" android:textSize="16pt" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_weight="1" /> </TableRow> <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="2"> <LinearLayout android:layout_width="wrap_content" android:layout_height="fill_parent" android:orientation="vertical" android:layout_weight="2"> <LinearLayout android:layout_weight="1" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/Button02" android:textSize="16pt" android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="1" /> <Button android:textSize="16pt" android:id="@+id/Button06" android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="2" /> </LinearLayout> <Button android:id="@+id/Button01" android:layout_height="wrap_content" android:textSize="16pt" android:layout_weight="1" android:layout_width="fill_parent" android:text="0" /> </LinearLayout> <LinearLayout android:layout_width="wrap_content" android:layout_height="fill_parent" android:orientation="vertical" android:layout_weight="1"> <Button android:id="@+id/Button03" android:textSize="16pt" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:text="3" /> <Button android:textSize="16pt" android:id="@+id/Button07" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:text="." /> </LinearLayout> <Button android:id="@+id/Button04" android:textSize="16pt" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_weight="1" android:text="=" /> </TableRow> </TableLayout> </LinearLayout>

    Read the article

  • iTextSharp table alignment

    - by Kumar
    I am using iTextSharp to create a pdf in my ASP.NET 3.5 application. Below is the current layout of my pdf: John Doe   EmployeeID 2008      Department1                                                        Department2                                                        Department3 Below is the code I am using: PdfPTable table = new PdfPTable(4); table.DefaultCell.Border = 0; var empName = new Phrase("John Doe"); var empIDHeading = new Phrase("EmployeeID"); var empID = new Phrase("2008"); var departments = new PdfPCell(CreateDepartments()) { Border = 0, NoWrap = true }; table.AddCell(empName); table.AddCell(empIDHeading ); table.AddCell(empID ); table.AddCell(departments); private PdfPTable CreateDepartments() { var d1 = new Phrase("Department1"); var d2 = new Phrase("Department2"); var d3 = new Phrase("Department3"); PdfPTable table = new PdfPTable(2); table.DefaultCell.Border = 0; table.AddCell(d1); table.AddCell(d2); table.AddCell(d3); return table; } How can I modify this code to get the below output:                                                        Department1                                                       Department2 John Doe   EmployeeID 2008      Department3

    Read the article

  • iText - Modifying PDFWriter# Verticle Alignment manually

    - by simon622
    Ive hit upon a problem using iText (java), despite hours of looking thru the docs.. Most of the code I use goes via the Document# API which tracks (via the PDFWriter instance) the current Y position. HOWEVER, we need to use the PdfContentByte part of the API to insert some Java2d into the document, but in doing so this appears to bypass the logic which tracks verticle writes. So next time I use the Document API, it overwrites the contents of the manually inserted things. I want to mimick the behaviour of the Document# API by manually moving the cursor on N number of units (N being the height of the element inserted by the PDFContentByte API), such that when I then use the Document object again, bingo, its cursor is in the correct location. I can see that a method to obtain the cursor exists; PdfWriter#getVerticalPosition(boolean); But not one to set it?! Any ideas anyone? Thanks.

    Read the article

  • iPhone Device 3.1 SDK Breaks vertical alignment of UITableViewCellStyleValue1 textLabel

    - by user171089
    Can anyone provide an explanation for the following phenomenon? As of the iPhone Device 3.1 SDK, I've found that if a UITableViewCell is of style UITableViewCellStyleValue1 and its detailTextLabel.text is unassigned, then the textLabel does not display in the center of the cell as would be expected. One notable caveat is that this only happens for me when I'm testing on the Device – the iPhone Simulator 3.1 SDK displays the cells correctly. Also, this is not a problem when using the iPhone Device 3.0 SDK. Below is a simple UITableView subclass implementation that demonstrates the problem. @implementation BuggyTableViewController #pragma mark Table view methods // Customize the number of rows in the table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 3; } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease]; } switch (indexPath.row) { case 0: cell.textLabel.text = @"detailTextLabel.text unassigned"; break; case 1: cell.textLabel.text = @"detailTextLabel.text = @\"\""; cell.detailTextLabel.text = @""; break; case 2: cell.textLabel.text = @"detailTextLabel.text = @\"A\""; cell.detailTextLabel.text = @"A"; break; default: break; } return cell; } @end

    Read the article

  • RadioButton text alignment

    - by melling
    For some reason the text on each of my RadioButtons is raised, almost to the level of a superscript (ok maybe half way there). How do I set the text to align so that if I could draw a line through the center of the button and have it intersect with the center point of the text? * Button1 * Button2

    Read the article

  • WPF DATAGRID CELL CONTENTS ALIGNMENT

    - by Ulhas Tuscano
    Hi, I have a WPF DataGrid control I am binding the objects of class Customer to DataGrid Rows using ObservableCollection at run time. I have set MinRowHeight="100" & I want the rows of DataGrid should be HorizontallyAligned at Center & Vertically at Left. Setting DataGrid properties VerticalContentAlignment="Center" HorizontalContentAlignment="Center" doesn't help. Code :--- System.Collections.ObjectModel.ObservableCollection cust1 = new System.Collections.ObjectModel.ObservableCollection { new Customer{FirstName="Ulhas",LastName="TUSCANO",IsMember = true ,Email="[email protected]",Status=OrderStatus.Processing }, new Customer{FirstName="Neville",LastName="TUSCANO",IsMember = true ,Email="[email protected]",Status=OrderStatus.Received }, new Customer{FirstName="Pascoal",LastName="TUSCANO",IsMember = true ,Email="[email protected]",Status=OrderStatus.None }, new Customer{FirstName="Mary",LastName="TUSCANO",IsMember = true ,Email="[email protected]",Status=OrderStatus.Received }, new Customer{FirstName="Mary",LastName="TUSCANO",IsMember = true ,Email="[email protected]",Status=OrderStatus.Received }, new Customer{FirstName="Mary",LastName="TUSCANO",IsMember = true ,Email="[email protected]",Status=OrderStatus.Received }, }; dataGrid1.ItemsSource = cust1; public class Customer { public string FirstName{get;set;} public string LastName { get; set; } public string Email { get; set; } public bool IsMember { get; set; } public OrderStatus Status { get; set; } } Any help will be greatly appreciated, Thanx

    Read the article

  • Floating DIV's alignment problem.

    - by Rodrigo
    I have a fluid layout with DIV's of different heights and widths, and I'd like them to be aligned by lines, kind of like when you do a search on istockphoto, except aligned to the top: image here--http://i207.photobucket.com/albums/bb121/jpbanks/Capturadepantalla2010-06-02alas1902.png I tried floating all the DIV's to the left, but they are not aligned correctly into lines: image here--http://i207.photobucket.com/albums/bb121/jpbanks/Capturadepantalla2010-06-02alas1900.png See how "Prueba" doesn't go all the way to the left? I thought of the jQuery plugin Masonry but what I want is obviously different. Any solution using either CSS or jQuery would be fine. Any ideas?

    Read the article

  • WPF wrappanel item alignment problem when scrolling

    - by Jayho
    Someone help me out pls. I set a wrapPanel in a listbox itemPanelTemplate, Also, I already set the ScrollViewer.CanContentScroll="True". But why the listbox items are not scrolling up/down by ITEM one by one? The scroll style is still by PIXEL. Is anyone help me? <Grid> <ListBox x:Name="testListbox" ScrollViewer.CanContentScroll="True"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <WrapPanel Width="200" ScrollViewer.CanContentScroll="True"/> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> <ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True"> <Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/> </ListBoxItem> </ListBox> </Grid>

    Read the article

  • UILabel: vertical alignment

    - by Stefan
    Hi, I have an UILabel with two lines. Sometimes it's text is short. Then the text gets displayed in the center (vertically) of the UILabel. How do I align my text at the top (vertically)? Regards...

    Read the article

  • UIToolbar UIBarButtonItem Alignment question

    - by Luther Baker
    I need to create a UIToolbar that has two UIBarButtonItems. The 1st button must be centered and the 2nd item must be right aligned. I understand and use Flexible spacing and it works great when I need to balance buttons across the UIToolbar, but with only two buttons, I can't seem to perfectly center the middle button. I've even initialized the view.toolbarItems array with NSArray *items = [[NSArray alloc] initWithObjects:fixed, flex, center_button, flex, right_button, nil]; and set fixed.width = right_button.width ... but still, the center_button is never perfectly centered.

    Read the article

  • Code Alignment In SQL SERVER 2005

    - by user294488
    I am using SQL SERVER MANAGEMENT STUDIO. I want to know the shortcuts for easily aligning the T-SQL Queries and codes in a beautiful format for easy readability and understandablility. Please Let me know how to align the code without using any SQL SERVER FORMATTING / ALIGNING Tools. It is Urgent, Waiting for your kind reply at the earliest possible. Please do give your valuable tips to align the same, right now to align the code i mean to make the code right and left aligned i m using the TAB and SPACE BAR key which becomes very difficult when the length of code is increasing.

    Read the article

  • UItextfield text alignment issue in cocos2D iPhone

    - by shreya
    Hi All, Please take a look of the following screen shot. Here is my code, I am using cocos2D CGAffineTransform transform = CGAffineTransformMakeRotation(3.14159/2); _view = [[CCDirector sharedDirector]openGLView]; // Input the user name _nameField = [[UITextField alloc]initWithFrame:CGRectMake(130.0, 270.0, 200.0, 30.0)]; _nameField.transform = transform; _nameField.adjustsFontSizeToFitWidth = YES; _nameField.textColor = [UIColor blackColor]; [_nameField setFont:[UIFont fontWithName:@"Arial" size:14]]; _nameField.placeholder = @"<Enter Your Name>"; _nameField.backgroundColor = [UIColor clearColor]; _nameField.autocorrectionType = UITextAutocorrectionTypeNo; _nameField.autocapitalizationType = UITextAutocapitalizationTypeAllCharacters; _nameField.textAlignment = UITextAlignmentCenter; _nameField.keyboardType = UIKeyboardTypeDefault; _nameField.returnKeyType = UIReturnKeyDone; _nameField.tag = 0; _nameField.delegate = self; _nameField.clearButtonMode = UITextFieldViewModeNever; _nameField.borderStyle = UITextBorderStyleRoundedRect; [_view addSubview:_nameField]; The problem is the text is typing on the top of the text field. I want it to be in the middle not to top.

    Read the article

  • UL alignment to bottom

    - by air
    dear i have define on ul <ul id="album"> <li id="list1"> <a href="#"> <img src="google.jpg" height="50"/> </a> <a href="#" class="user-title">Profile Pictures</a> 1 Picture </li> <li id="list1"> <a href="#"> <img src="yahoo.jpg" height="150"/> </a> <a href="#" class="user-title">Profile Pictures</a> 2 Picture </li> </ul> css for is as bellow. #album{ height:195px; width:155px; overflow:hidden; padding:6px 10px 14px 10px; float:left; } #album li{ border:0; padding:0; list-style:none; margin: 0 0.15em; list-style:none; display: inline; } #album img{ vertical-align:bottom; } #album a{ color:#000000; text-decoration:none; } #album .user-title{ display:block; font-weight:bold; margin-bottom:4px; font-size:11px; color:#36538D; } #album .addas{ display:block; font-size:11px; color:#666666; } #album img{ margin-right:14px; padding:4px; } this is working fine. but i need to align images to bottom on display. here is image

    Read the article

  • latex list environment inside the tabular environment: extra line at top preventing alignment

    - by Usagi
    Hello good people of stackoverflow. I have a LaTeX question that is bugging me. I have been trying to get a list environment to appear correctly inside the tabular environment. So far I have gotten everything to my liking except one thing: the top of the list does not align with other entries in the table, in fact it looks like it adds one line above the list... I would like to have these lists at the top. This is what I have, a custom list environment: \newenvironment{flushemize}{ \begin{list}{$\bullet$} {\setlength{\itemsep}{1pt} \setlength{\parskip}{0pt} \setlength{\parsep}{0pt} \setlength{\partopsep}{0pt} \setlength{\topsep}{0pt} \setlength{\leftmargin}{12pt}}}{\end{list}} Renamed ragged right: \newcommand{\rr}{\raggedright} and here is my table: \begin{table}[H]\caption{Tank comparisons}\label{tab:tanks} \centering \rowcolors{2}{white}{tableShade} \begin{tabular}{p{1in}p{1.5in}p{1.5in}rr} \toprule {\bf Material} & {\bf Pros} & {\bf Cons} & {\bf Size} & {\bf Cost} \\ \midrule \rr Reinforced concrete &\rr \begin{flushemize}\item Strong \item Secure \end{flushemize}&\rr \begin{flushemize}\item Prone to leaks \item Relatively expensive to install \item Heavy \end{flushemize} & 100,000 gal & \$299,400 \\ \rr Steel & \begin{flushemize}\item Strong \item Secure \end{flushemize} & \begin{flushemize}\item Relatively expensive to install \item Heavy \item Require painting to prevent rusting \end{flushemize} & 100,000 gal & \$130,100 \\ \rr Polypropylene & \begin{flushemize}\item Easy to install \item Mobile \item Inexpensive \item Prefabricated \end{flushemize} & \begin{flushemize}\item Relatively insecure \item Max size available 10,000 gal \end{flushemize} & 10,000 gal & \$5,000 \\ \rr Wood & \begin{flushemize}\item Easy to install \item Mobile \item Cheap to install \end{flushemize} & \begin{flushemize}\item Prone to rot \item Must remain full once constructed \end{flushemize} & 100,000 gal & \$86,300\\ \bottomrule \end{tabular} \end{table} Thank you for any advice :)

    Read the article

  • Android layout alignment issues

    - by Jake Schwartz
    So I am trying to get my layout to look like this: | button text button | So that the text is centered between my two buttons. I first tried using LinearLayouts and layout_gravity tags, but that would give me something like: | buttontextbutton | and now I have a relative layout with alignParentLeft/Right and centerInParent tags but the layout now looks like | button text buttonnnnnnnnnnnnn | Is there a way to get my layout right with text that changes lengths? Thanks, Jake

    Read the article

  • Help in alignment in HTML2pdf..

    - by piemesons
    I am having a html page with no style attribute.HTML tags i am using are "center,line break tag, bold tag".Html page doesnot contain any table. its a simple document.I need help for:- Adding margin of 1 inch on all sides of the pdf file. I want to start every para with space of two tabs. ("&nbsp" generate space in html file but not in pdf file.) Code i am using:-- ob_start(); // start buffering and displaying page echo 'All the content i m fetching according my requirements'; $file_name_string=substr($guid, 0, 8); $file_name=$file_name_string.".htm"; file_put_contents($file_name, ob_get_contents()); // end buffering and displaying page ob_end_flush(); $output_file=$file_name_string.".pdf"; require('html2fpdf.php'); $pdf=new HTML2FPDF(); $pdf->SetFont('Arial','B',12); $pdf->AddPage(); $fp = fopen($file_name,"r"); $strContent = fread($fp, filesize($file_name)); fclose($fp); $pdf->WriteHTML($strContent); $pdf->Output($output_file); EDIT ANybody who can help me....

    Read the article

  • Alignment of rollover item affected by position of header

    - by Steven
    Hi guys, Got a problem where when you rollover "about us" the rollover appeared to the right of the screen exactly 224 pixels from the edge of the browser (maintained this gap when reducing the size of the browser) I fixed it by changing the .css position of the wrapper (from absolute to static) How ever now as you can see in the example ive done the header is aligning to the left: http://jimbeamracing.com.au/navigationtest.htm wrapper{ margin:0 auto; width:994px; position:static; padding:113px 0 0; } Any help would be much appreciated Regards, Steven

    Read the article

  • ASP.NET validators alignment issue

    - by Mahesh
    Hi, I am developing contactus webpage which have a input field called Email. It is validated against a required field validator and regular expression validator with appropriate messages. Required: Enter Email Regular Expression: Invalid Email I am setting these two as given below: <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox> <font color="#FF0000">*</font> <asp:RequiredFieldValidator ID="rfvemail" CssClass="error_text" ControlToValidate="txtEmail" runat="server" ErrorMessage="Enter email address."></asp:RequiredFieldValidator> <asp:RegularExpressionValidator ID="revemail" runat="server" ControlToValidate="txtEmail" ErrorMessage="Invalid Email" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator> My problem is both Enter Email and Invalid Email is occupying its own space. For Ex: If I leave email as empty space and press submit, Enter Email is displaying right next to it. If I enter invalid email(xxx), Enter Email is off but taking the space, Invalid Email message is displayed after these space taken by 'Enter Email' before. Is there any way to remove this space?? Mahesh

    Read the article

  • Cakephp 1.3 Form Alignment?

    - by Sham Ali
    Hi Fellwos i am new at cakephp 1.3, i am trying to create a Edit User Form with Form Helper in Cakephp 1.3. i am unable to make a customize alignments of the form elements. for example echo $this-Form-create('Model', array('action' = 'edit_users','id' = 'UserForm')); echo $this-Form-input('First Name',array('style'='width:100px','label'='First Name:')); echo $this-Form-input('Last Name',array('style'='width:100px','label'='Last Name:')); echo $this-Form-input('Position',array('style'='width:100px','label'='Position:')); i want first two input fields in single line and 3rd input field in 2nd line, i have tried it with div false, but its not working. if anybody can help me, thanks in advance

    Read the article

  • css issue for alignment of divs

    - by jay
    Hi, I am working on this site philippdecor.com and I am having a difficulty in figuring out this css issue. When I on mouse over on "Main categories" that appears on the right side, it shows a drop down with links in it. Two things happens, 1) in IE(7) - the drop down hides behind another div 2) in both ie and ff, it pushes other div below that to go down and on mouse out, it looks fine. I am not sure which css property can fix this. please help me out code

    Read the article

  • IE8 alignment in div issue

    - by xrx215
    How to align the the button in center of div in IE8. Works fine in IE7 but not in IE8 <div id="dPopupFooter" style="background-color: #d9d9d9; position: absolute; z-index: 5; bottom: 0px; width: 100%; height: 30px; border-top: solid 1px #acacac; text-align: center; padding-top: 3px;"> <table><tr><td><xrx:CustomButton id="btnClose" runat="server" OnClientClick="ClosePopup();" /></td></tr></table> </div>

    Read the article

  • strict aliasing and alignment

    - by cooky451
    I need a safe way to alias between arbitrary POD types, conforming to ISO-C++11 explicitly considering 3.10/10 and 3.11 of n3242 or later. There are a lot of questions about strict aliasing here, most of them regarding C and not C++. I found a "solution" for C which uses unions, probably using this section union type that includes one of the aforementioned types among its elements or nonstatic data members From that I built this. #include <iostream> template <typename T, typename U> T& access_as(U* p) { union dummy_union { U dummy; T destination; }; dummy_union* u = (dummy_union*)p; return u->destination; } struct test { short s; int i; }; int main() { int buf[2]; static_assert(sizeof(buf) >= sizeof(double), ""); static_assert(sizeof(buf) >= sizeof(test), ""); access_as<double>(buf) = 42.1337; std::cout << access_as<double>(buf) << '\n'; access_as<test>(buf).s = 42; access_as<test>(buf).i = 1234; std::cout << access_as<test>(buf).s << '\n'; std::cout << access_as<test>(buf).i << '\n'; } My question is, just to be sure, is this program legal according to the standard?* It doesn't give any warnings whatsoever and works fine when compiling with MinGW/GCC 4.6.2 using: g++ -std=c++0x -Wall -Wextra -O3 -fstrict-aliasing -o alias.exe alias.cpp * Edit: And if not, how could one modify this to be legal?

    Read the article

  • Alignment of Hebrew Vowel points in Android

    - by Aharon Manne
    I want to display Hebrew text with vowel points (nikkud) using the Canvas.drawText interface. The vowel points come out misaligned, as in the following image taken using a Motorola Defy+ device: The hiriq is between the resh and the yod, the holam between the vav and nun. I have added the rtl code (\u200F) to the string at both ends, no joy. I know that there are applications that have solved this problem, such as the Smart Siddur. Is there a difference between text-based applications and graphics based? I would think that the same engine renders the text in both cases. I suppose I could split up the string and place the vowels separately, but that seems pretty painful and not extensible. TIA for any clues.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >