Search Results

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

Page 10/27 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • CSS Differences Between IE and FF

    - by Joe Majewski
    I hope I'm not breaking any rules by asking a question that pertains to a project I'm working on. If you view my page here and view it in Firefox and again in Internet Explorer, the width of the main content boxes differs. In Firefox, everything aligns perfectly with the advertisement at the top of the page, but in IE, the width of the content boxes seems to fall short by about 20 or so pixels. My question is obvious by now, but what is causing the width in IE to fall short, and what would a simple solution be? If I happen to be breaking the rules by asking a question that is not generic enough to benefit others, then allow me to rephrase it; what would be the best approach to solving visual differences between browsers? Should I use a separate CSS file for IE, or is there a way to define lines in my CSS file that only get rendered by a specific browser? It would be best if someone could provide me with the necessary CSS to align things properly, but I would be more than happy to learn about how to make the CSS dynamic (if that's possible). Thanks everyone. :)

    Read the article

  • Why won't my images align properly?

    I'm trying to make a dynamically sizable title banner, using fairly simple image tricks. I place the banner image in a table cell, and set the background-image of the table row to a one-pixel-wide repeat of the banner's right-most pixel column. Thus, the banner image appears to stretch to fit the screen width without stretching the logo. The code below is my entire page so far, and the problem is shown in a red circle in the screenshot. This is the transition where the main image ends and the one-pixel-wide background image begins. It appears that the one-pixel-wide bar at the end is compressed by one pixel - making the tops align properly, while the bottoms are one pixel off. I should add that I have checked the images more than once to make cure they the image data is correct. They are %100 accurate as far as MSPaint is concerned. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body bgcolor="#000000"> <form id="form1" runat="server"> <div> <table style="width:100%; "> <tr style="background-image: url('Images/Banners/WebBannerWideBar.png')"> <!--WebBannerWideBar is 1x100 px--> <td> <img alt="Angry Octopus" src="Images/Banners/WebBannerWide.png" /> <!--WebBannerWide is 760x100 px--> </td> </tr> </table> </div> </form> </body> </html>

    Read the article

  • With HTML and CSS, how to have an image that is vertically aligned with a horizontal line?

    - by sungod000
    I'd like the image on the left to be adjacent to the horizontal line on the right (bottoms lining up flush). It should be responsive so that the line can change widths as needed. Right now, the image is sitting on top of the line, not beside it. Here is the HTML <div> <img src="image.png"> <hr> </div> Here is the CSS img { float:left } hr { width:100% } How to make this happen?

    Read the article

  • Aligning a link beside a h2 heading

    - by jme1988
    Really simple question, how do I force a link to appear inline with a h2 heading? I have the following code : http://jsfiddle.net/jezzipin/6DpPX/ and I'd just like the 'Back to top' link to appear inline with the 'Social Media' heading but everything I try doesn't seem to work. Even the use of spans. Any help would be greatly appreciated. jme1988 N.B. Just to be clear, this is the effect I am after:

    Read the article

  • How do I vertcally align thumbnails of unknown height using jQuery?

    - by playahabana
    Ok, I am a complete beginner to this, in fact I am still building my first website. I am attempting to do this all by hand-coding without a CMS in order to try and learn as much possible as quickly as possible. If this post is in the wrong place I apologise, and a pointer to right place would be appreciated. Here goes, I am trying to peice together a bit of jQuery that will automatically vertically align my thumbnails in my image gallery (they are all different sizes). They are within fixed size div's and the function I am attempting looks something like this: <script type="text/javascript"> $('#ul.photo).bind(function() { var smartVert=$(this); var phty=ob.("ul.photo img").height(); //get height of photos var phtdif=Math.floor(208 - phty); //subtract height of photo from div height var phttop=Math.floor(phtdif / 2); //gets padding reqd. $ob.("ul.photo").css({'padding-top' : phttop}) //sets padding to center thumbnail }); smartVert(); unsurprisingly this doesn't work, if some kindly soul could take pity on a total noob, and point out where I am going wrong (probably in writing complete gibberish would be my first guess) it would be greatly appreciated- even if you could just point me in the direcion of a tutorial regarding these things, I have looked and found one reference that said such a function was easy to create, but it did not elaborate. thankyou in advance

    Read the article

  • How to create "floating TextViews" in Android?

    - by Sotapanna
    Hi stackies, I'm programmatically putting various TextViews into a LinearLayout with a horizontal orientation. After 2h of research I couldn't find out how to tell Android not to squeeze all the TextViews in one line but instead to "float" non-fitting TextViews into the next line. I know there isn't something like actual "lines" in a LinearLayout, but how can I tell the TextViews to actually behave like floating DIVs from the HTML world? Thanks alot! Be well S.

    Read the article

  • Centering An Inline-Block DIV

    - by Aaron Brewer
    Does anybody know how to center align a DIV that has the display set to inline-block? I cannot set the display to block because I have a background image that needs to be repeated, and it needs to expand based on the content. It sits inside of a parent div, in which is larger when it comes to width. So all in all. Does anyone have a fix to center align a div with the display set to inline-block? And no, text-align: center; does not work, nor does margin: 0 auto; jsFiddle: http://jsfiddle.net/HkvzM/ Thank you!

    Read the article

  • Aligning left and right in a simple footer

    - by Wolfram
    I'm currently working on a simple footer, and I would like to align one line of text left and the other to the right. This is what I have so far: <div id="footer"> Last Updated: October 15, 2012 <!--left align--> Contact Us Login <!--right align (these will be links)--> </div> #footer { font-family: Arial; font-size: .9em; color: #24ACAE; border-top: 1px solid #24ACAE; margin-left: 90px; margin-right: 90px; padding-top: 5px; } The above code results in the two lines of text being next to each other and I've tried various ways of fixing this such as putting the the 2nd line in a span and aligning right and even putting the lines into a table. None of what I have tried has resulted in both lines being properly aligned. Using a margin-left alone does not work because when the first line is updated and becomes longer, it will push the second line downwards. Relative positioning seems to have the same issue. Hopefully there's something simple that I'm overlooking.

    Read the article

  • How to use vertical-align: middle; properly?

    - by Andrew
    I want to have my list (nav) align to the center of an image (logo). I tried using vertical-align: middle;, but I couldn't get it to work when I floated the images left and right. Here's my code: HTML: <div id="head"> <img id="logo" src="logo.png" /> <ul id="nav"> <li><a href="#">Item 1</a></li> <li><a href="#">Item 2</a></li> <li><a href="#">Item 3</a></li> </ul> </div> CSS: #head { margin-top: 2px; width: 100%; } #logo { float: left; } ul#nav { float: right; } ul#nav li { display: inline; list-style-type: none; } I took all the vertical-align: middle;'s from where I put them (I tested it in each element, even though it was only supposed to be applied to #logo, from what I've read.) Anyways, any help would be appreciated.

    Read the article

  • RTL shows numbers at the end of lines

    - by Tiger
    Hi. Trying to display a hebrew string that starts with a number, always displays the number at the end of the string like so: 1. ??? ???? ????? but I need the number to be displayed at the right side of the text- any solution to that? It happens with UILabel & UITextField & UITextView and trying to write the number at the left side also produce the same resault. Playing with combinations of UITextAlignment will doesn't help.

    Read the article

  • Aligning divs with different dimensions horizontally.

    - by serg555
    I have a tag cloud with different font sizes. <div> <a style="font-size:15px;">tag1</a> <a style="font-size:10px;">tag1</a> </div> And it looks like this: Now I need to wrap each tag into its own div: <style> .cloud {float:left} .tag {float:left} </style> <div class="cloud"> <div class="tag"><a style="font-size:15px;">tag1</a></div> <div class="tag"><a style="font-size:10px;">tag1</a></div> </div> Which puts them all over the place. How to make them look like on the first picture?

    Read the article

  • Vertical (rotated) label in Android

    - by DroidIn.net
    I need 2 ways of showing vertical label in Android: Horizontal label turned 90 degrees counterclockwise (letters on the side) Horizontal label with letters one under the other (like a store sign) Do I need to develop custom widgets for both cases (one case), can I make TextView to render that way, and what would be a good way to do something like that if I need to go completely custom?

    Read the article

  • Misaligned Pointer Performance

    - by Elite Mx
    Aren't misaligned pointers (in the BEST possible case) supposed to slow down performance and in the worst case crash your program (assuming the compiler was nice enough to compile your invalid c program). Well, the following code doesn't seem to have any performance differences between the aligned and misaligned versions. Why is that? /* brutality.c */ #ifdef BRUTALITY xs = (unsigned long *) ((unsigned char *) xs + 1); #endif ... /* main.c */ #include <stdio.h> #include <stdlib.h> #define size_t_max ((size_t)-1) #define max_count(var) (size_t_max / (sizeof var)) int main(int argc, char *argv[]) { unsigned long sum, *xs, *itr, *xs_end; size_t element_count = max_count(*xs) >> 4; xs = malloc(element_count * (sizeof *xs)); if(!xs) exit(1); xs_end = xs + element_count - 1; sum = 0; for(itr = xs; itr < xs_end; itr++) *itr = 0; #include "brutality.c" itr = xs; while(itr < xs_end) sum += *itr++; printf("%lu\n", sum); /* we could free the malloc-ed memory here */ /* but we are almost done */ exit(0); } Compiled and tested on two separate machines using gcc -pedantic -Wall -O0 -std=c99 main.c for i in {0..9}; do time ./a.out; done

    Read the article

  • centering image vertically in all resolutions

    - by gnomixa
    I need to be able to center the image vertically for all the common resolutions. A lot of ppl here on SO have already asked this question before, and 90% of then give this tutorial http://www.jakpsatweb.cz/css/css-vertical-center-solution.html as an answer. However, when viewed at my 1280 by 1024 res monitor in FF, it's not centered. And worse yet, it breaks horribly in IE7. So, it's definitely NOT the answer. Am I chasing the impossible dream? The solution has to work for FF and IE 6/7 the solution can be anything that would work, though being a bit of a purist, I would prefer a div over table:)

    Read the article

  • Aligning all panel components java

    - by destructo_gold
    I am using the BoxLayout layout manager in java, and have aligned a bunch of components: myLabel.setAlignmentX(Component.LEFT_ALIGNMENT); myTextBox.setAlignmentX(Component.LEFT_ALIGNMENT); myButton.setAlignmentX(Component.LEFT_ALIGNMENT); ... I have a lot of components, and this seems over the top. Is there a shorthand way? I tried the following, but setAlignmentX isn't a method inside Component? for (Component c : personPanel.getComponents()) { c.setAlignmentX(Component.LEFT_ALIGNMENT); }

    Read the article

  • Skeleton framework - css list spacing

    - by user1745014
    I'm trying to float my navigation at the top much more to left around 200px atleast more towards the end of the line that can been seen below. Everytime I apply a margin or padding it pushes the navigation to go under each other even though there is loads of room, could anyone take a look at my code. means alot thanks, I always find things easier with firebug so I uploaded it here http://xronn.co.uk/hosting/ Thanks again!

    Read the article

  • Align/Wrap images around div

    - by Ryan Phillips
    What I'm trying to achieve is a page with a div centered in the middle of the screen (720x360). This is done with jQuery using $(window).height() and $(window).width() and works perfectly. The next part is getting 180x180 images to fit around that middle div. These will fill the screen + beyond. I'm stuck on how to get these to align that way and I couldn't find a live example of anyone doing the same thing. So, is this even possible? Thanks, Any help is appreciated!

    Read the article

  • Unable to center text in IE but works in firefox

    - by greenpool
    Can somebody point out where I'm going wrong with the following code. Text inside td elements need to be centered except for Summary and Experience. This only appears to work in Firefox/chrome. In IE8 all td text are displayed as left-justified. No matter what I try it doesn't center it. Any particular reason why this would happen? Thanks. css #viewAll { font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; width:100%; border-collapse:collapse; margin-left:10px; table-layout: fixed; } #viewAll td, #viewAll th { font-size:1.1em; border:1px solid #98bf21; word-wrap:break-word; text-align:center; overflow:hidden; } #viewAll tbody td{ padding:2px; } #viewAll th { font-size:1.1em; padding-top:5px; padding-bottom:4px; background-color:#A7C942; color:#ffffff; } table <?php echo '<table id="viewAll" class="tablesorter">'; echo '<thead>'; echo '<tr align="center">'; echo '<th style="width:70px;">Product</th>'; echo '<th style="width:105px;">Prob</th>'; echo '<th style="width:105px;">I</th>'; echo '<th style="width:60px;">Status</th>'; echo '<th style="width:120px;">Experience</th>'; echo '<th style="width:200px;">Technical Summary</th>'; echo '<th style="width:80px;">Record Created</th>'; echo '<th style="width:80px;">Record Updated</th>'; echo '<th style="width:50px;">Open</th>'; echo '</tr>'; echo '</thead>'; echo '<tbody>'; while ($data=mysqli_fetch_array($result)){ #limiting the summary text displayed in the table $limited_summary = (strlen($data['summary']) > 300) ? substr(($data['summary']),0,300) . '...' : $data['summary']; $limited_exp = (strlen($data['exp']) > 300) ? substr(($data['exp']),0,300) . '...' : $data['exp']; echo '<tr align="center"> <td style="width:70px; text-align:center;">'.$data['product'].'</td>'; //if value is '-' do not display as link if ($data['prob'] != '-'){ echo '<td style="width:105px;">'.$data['prob'].'</a></td>'; } else{ echo '<td style="width:105px; ">'.$data['prob'].'</td>'; } if ($data['i'] != '-'){ echo '<td style="width:105px; ">'.$data['i'].'</a></td>'; } else{ echo '<td style="width:105px; ">'.$data['i'].'</td>'; } echo'<td style="width:40px; " >'.$data['status'].'</td> <td style="width:120px; text-align:left;">'.$limited_cust_exp.'</td> <td style="width:200px; text-align:left;">'.$limited_summary.'</td> <td style="width:80px; ">'.$data['created'].'</td> <td style="width:80px; ">'.$data['updated'].'</td>'; if (isset($_SESSION['username'])){ echo '<td style="width:50px; "> <form action="displayRecord.php" method="get">'.' <input type="hidden" name="id" value="'. $data['id'].'" style="text-decoration: none" /><input type="submit" value="Open" /></form></td>'; }else{ echo '<td style="width:50px; "> <form action="displayRecord.php" method="get">'.' <input type="hidden" name="id" value="'. $data['id'].'" style="text-decoration: none" /><input type="submit" value="View" /></form></td>'; } echo '</tr>'; }#end of while echo '</tbody>'; echo '</table>'; ?>

    Read the article

  • How to achieve Bottom Align floated div that sizes to it's container.

    - by Davy8
    How can I achieve the following layout? Specifically the positioning of Image and DIV I've found that unless I set a specific width for the Div, it will just go on to the next line and take up the full width of the container. Additionally aligning it relative to the bottom of the image is giving me trouble. Currently they're both float:left Edit: The two solutions so far work if the image is a constant width which I guess I could work with, but it's going in a Wordpress theme for an author's profile page and it's possible that images would have slightly variable widths. Is there a solution that would have the Div right next to the image (minus padding) regardless of how wide or narrow the image is? Basically having the div adjust its width to accommodate the image width.

    Read the article

  • Align a set of elements that are not next to each other in the HTML

    - by user1917727
    I am creating a comparison table where the columns are built as below: <div id = "wrapper"> <div id = "col1"> <div class = "row1"> text lots more text and more text </div> <div class = "row2"> text </div> <div class = "row3"> text </div> </div> <div id = "col2"> <div class = "row1"> text </div> <div class = "row2"> a lot of text </div> <div class = "row3"> text </div> </div> </div> Col1 and col2 are then displayed as an inline-block so they visually sit next to each other on the page. The problem is that the contents of each row may vary. Without setting a min-height of each row, how could i make sure that each row visually lines up with its corresponding row from the other column? I can't think of any way to achieve this in CSS alone. I'm wondering if there's some sneaky jQuery way of achieving this? EDIT: I Can't change the HTML structure. Cheers

    Read the article

  • GroupLayout: JScrollPane in TextArea is not working

    - by Dozent
    i'm new in java and recently started to develop an simple application. For the moment i have a problem with JScrollPanne, it's not able to scroll down (or up) when the text in textarea more than size of area. I have looked to some solutions, but all of them were for FlowLayot (GridLayout and BoxLayout), but not for GroupLayout. Here is the code: JPanel conent_p = new JPanel(); conent_p.setBorder(new TitledBorder(null, "", TitledBorder.LEADING, TitledBorder.TOP, null, null)); JLabel lblItemName = new JLabel("Item name:"); itemField = new JTextField(); itemField.setColumns(10); JLabel lblMxPrice = new JLabel("Max price:"); mpriceField = new JTextField(); mpriceField.setColumns(10); JLabel lblQuantity = new JLabel("Quantity:"); quanField = new JTextField(); quanField.setColumns(10); JLabel lblDelivery = new JLabel("Delivery:"); delivField = new JTextField(); delivField.setColumns(10); JLabel lblLogcat = new JLabel("LogCat:"); final JTextArea txtConsole = new JTextArea(); txtConsole.setEditable(false); txtConsole.setLineWrap(true); txtConsole.setWrapStyleWord(true); sbrText = new JScrollPane(txtConsole); sbrText.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); // Now create a new TextAreaOutputStream to write to our JTextArea control and wrap a // PrintStream around it to support the println/printf methods. PrintStream out = new PrintStream(new TextAreaOutputStream(txtConsole)); // redirect standard output stream to the TextAreaOutputStream System.setOut(out); // redirect standard error stream to the TextAreaOutputStream System.setErr(out); GroupLayout gl_conent_p = new GroupLayout(conent_p); gl_conent_p.setHorizontalGroup( gl_conent_p.createParallelGroup(Alignment.LEADING) .addGroup(gl_conent_p.createSequentialGroup() .addContainerGap() .addGroup(gl_conent_p.createParallelGroup(Alignment.LEADING) .addComponent(lblMxPrice, Alignment.TRAILING) .addComponent(lblItemName, Alignment.TRAILING) .addComponent(lblLogcat, Alignment.TRAILING)) .addGap(18) .addGroup(gl_conent_p.createParallelGroup(Alignment.LEADING) .addGroup(gl_conent_p.createSequentialGroup() .addGroup(gl_conent_p.createParallelGroup(Alignment.LEADING, false) .addComponent(itemField, GroupLayout.PREFERRED_SIZE, 365, GroupLayout.PREFERRED_SIZE) .addGroup(gl_conent_p.createSequentialGroup() .addComponent(mpriceField, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE) .addGap(18) .addComponent(lblQuantity) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(quanField, 0, 0, Short.MAX_VALUE) .addGap(18) .addComponent(lblDelivery) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(delivField, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED))) .addGap(100)) .addGroup(gl_conent_p.createSequentialGroup() .addComponent(txtConsole, GroupLayout.PREFERRED_SIZE, 345, GroupLayout.PREFERRED_SIZE) .addComponent(sbrText) .addContainerGap()))) ); gl_conent_p.setVerticalGroup( gl_conent_p.createParallelGroup(Alignment.LEADING) .addGroup(gl_conent_p.createSequentialGroup() .addContainerGap() .addGroup(gl_conent_p.createParallelGroup(Alignment.BASELINE) .addComponent(lblItemName) .addComponent(itemField, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)) .addGap(20) .addGroup(gl_conent_p.createParallelGroup(Alignment.LEADING) .addGroup(gl_conent_p.createParallelGroup(Alignment.BASELINE) .addComponent(lblDelivery) .addComponent(delivField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addGroup(gl_conent_p.createParallelGroup(Alignment.BASELINE) .addComponent(lblMxPrice) .addComponent(mpriceField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(lblQuantity) .addComponent(quanField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addGap(55) .addGroup(gl_conent_p.createParallelGroup(Alignment.BASELINE) .addComponent(lblLogcat) .addComponent(txtConsole, GroupLayout.PREFERRED_SIZE, 200, GroupLayout.PREFERRED_SIZE) .addComponent(sbrText)) .addContainerGap()) ); conent_p.setLayout(gl_conent_p); getContentPane().add(conent_p, BorderLayout.NORTH); JButton btnBuy = new JButton("Buy"); btnBuy.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent ev) { try { String title = itemField.getText().trim(); String mprice = mpriceField.getText().trim(); String quantity = quanField.getText().trim(); String deliver = delivField.getText().trim(); Item_CONCEPT item = new Item_CONCEPT(); item.setName(title); item.setDelivery(Integer.parseInt(deliver)); item.setStartPrice(0); item.setMaxPrice(Integer.parseInt(mprice)); myAgent.existsSeller(item); Date date = new Date(); DateFormat df = new SimpleDateFormat("dd.MM.yy HH:mm"); System.out.println(df.format(date)+": Buyer orders an item: "+item.getName()); //Clearing all fields itemField.setText(""); quanField.setText(""); delivField.setText(""); //txtConsole.setText(""); mpriceField.setText(""); } catch (Exception e) { JOptionPane.showMessageDialog(BuyerGUI.this, "A field is filled incorrectly. "+e.getMessage()+" is invalid.", "Error", JOptionPane.ERROR_MESSAGE); } } } );![enter image description here][1]

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >