Text in a Cell Problem

http://martinpaulphotography.com/About.html
The text on my about page is currently a graphic. I want it
to be live text. I deleted the graphic and typed into the cell. It
looked fine in DW but when I preview it in my browser the text is
not constrained vertically within the cell. Instead it shifts the
cell below it out of position? How do I get the text to stay in the
cell without shifting other cells out of position?
Hope this makes sense.
Thanks,
Martin.

Hi Martin,
What I had been referring to was just using the image as the
page background, not a table background.
It wouldn't need to go into a table or another container as a
background, it would have just been applied to the body of the
page.
Regardless, I see what you mean by the logo being different
on the home page so here's another way which should work for you.
There are any number of ways to do this and variations on the
things I'm about to mention, but this should be a good place to
start.
So, it's just the logo part of the image that's different
between the pages, and that looks like it's about the top 1/4 of
the image.
The bottom 3/4 of the image is the same on every page.
Slice your home page image horizontally just below the logo
reflection.
Now you have two images, the top half with the logo and the
bottom half.
The bottom half is the same on all pages, so you can just use
that on all pages.
You'll need another image, exactly the same as this top image
but with the weaker logo for the other pages.
You have one more image: The image that tiles your
background.
So, you'll have 4 images all together used in the basic page
design.
To avoid confusion, I'll call them bright logo, weak logo,
bottom half and tile.
You aren't going to need all of the javascript anymore
either, as you won't need to load all the image slices or use
rollover images.
This example will build the "About Us" page you originally
asked about.
So, start with a new page where all you have are the basics:
doctype, html, head, body, title and your meta tags.
By the way, change this tag: <META
NAME="CONTACT_ADDR"="[email protected]>
to this:
<META NAME="CONTACT_ADDR" CONTENT="[email protected]">
Let's deal with the tiling background first.
You have that applied as a table background currently, but
you can just apply it to the body of the page so there's no need
for a 100% wide table for a background effect.
Just before your </head> tag, add this CSS to style the
body so it looks like this :
<style type="text/css">
body {
padding: 0;
margin: 0 0 0 0;
/*/*/margin: 0 0 0 0; /* */
font-family: Arial, Helvetica, sans-serif;
text-align: left;
font-size:80%;
color: #CCCCCC;
background-image: url(graphics/tile_background.jpg);
background-repeat: repeat;
</style>
</head>
<body>
</body>
</html>
(adjust later to change font color (color:) font size, font
family, etc)
Note the background image and background repeat lines. This
will tile that diamond as the entire page background.
Next, add a table that is 1 column and 2 rows.
Give it a center align and zero out the attributes. Give it a
width that's the same as your whole image:
<table width="937" border="0" align="center"
cellpadding="0" cellspacing="0">
Next, insert the weak logo image into the top row (top cell).
The bottom half of the image will be used as the background
image of the second row in this table.
You won't need to insert it into the second row; use CSS to
make it the background.
Because this is a background image, it won't act like an
inserted image and stretch the cell to the same height as the
image.
We'll take care of that in a minute.
The first step is to define a style for this table cell.
We'll make it a class and call it "content"
Insert this right before the </style> tag.
.content {
background-image: url(graphics/bottomhalf.jpg);
background-repeat: no-repeat;
background-position: center top;
Then, assign this class to the cell that is the second row.
<td class="content">
You won't see the whole image yet, as the second row doesn't
have enough content to make it tall enough to see the whole
background image. We'll fix that in a minute.
Next, insert a table into the second row. Make the table 1
row, 3 columns and 100% wide.
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
Don't assign any widths to the three columns right now.
The first column will hold your navigation, the middle column
will be your about us text content, and the last column is going to
control the height of the table so we can see that whole
"bottomhalf" background image.
For the first column, assign a vertical align of "top".
Then, in that first column, insert a table with 1 column and
as many rows as needed for your navigation. Give this table a
desired width in pixels.
Type the name of the link in each row.
In the third column, insert a transparent gif that is 1px
wide and the same number of pixels high as your "bottomhalf" image
is.
This forces this table and the row it is in (.content) to be
the same height as the bottomhalf image, so you see the whole
thing.
Now, give the center column a width of 100%. This will make
the first cell hug the navigation table and the third cell hug the
spacer image. The center cell will fill the remaining area.
It should look something like this now:
<body>
<table width="937" border="0" align="center"
cellpadding="0" cellspacing="0">
<tr>
<td><img src="graphics/weaklogo.jpg" width="937"
height="185" alt="blah"></td>
</tr>
<tr>
<td class="content"><table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td valign="top"> <table width="200" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td>Home</td>
</tr>
<tr>
<td>About</td>
</tr>
<tr>
<td>Gallery</td>
</tr>
<tr>
<td>Rates</td>
</tr>
<tr>
<td>Login</td>
</tr>
<tr>
<td>Content</td>
</tr>
</table></td>
<td width="100%"><p>All about us text and more
and more</p></td>
<td><img src="graphics/spacer.gif" alt="" width="1"
height="500"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Apply links to the navigation text.
I have to run, but this is a good start.
Next is to use CSS to style the links so they change color on
hover, and to control the positioning of them as well as the
positioning, line spacing, color , etc,etc of the about us text.
This design will still be somewhat at the mercy of the user
if the user has an enormous text size setting in their browser.
This would be very rare I think and would just mean the text
would extend lower than the image. That's the string that's
attached to using a large image as the whole background instead of
a repeating image or a solid color. The positive is that the image
won't shift in pieces or break like it does now.
Tim

Similar Messages

  • Vertical alignment of text in a cell doesn't work

    In Numbers 3.2, the vertical text alignment seems to have no effect on the text. Whether I select the text itself, the cell, or the row, pressing one of the vertical alignment buttons for top, middle, or bottom does nothing.
    I've searched through all the menus but I don't see anything to affect this. Alignment in the menu is of the left, right, justify variety, not top, middle, bottom.
    My goal is to reduce the padding in a row so that I can squeeze the text right up to the cell borders, but Numbers doesn't seem to allow me to do this. Yet I have someone else's number sheet, and it's obviously possible since they have it in their sheet.
    Thanks for any help,
    Confused newb

    AlizaG wrote:
    Annoyingly, when I searched for my question I was only shown questions that were not related to this one. Now that I've posted it, the related questions are shown in the sidebar and lo and behold: other people have had this problem too...
    The culprit is the automatic text inset of 4 pts. Drastically un-intuitive.
    Aliza,
    Only un-intuitive if you believe that most people would like their cell content lying right against the cell border.
    Jerry

  • Styled Text in Table Cell

    Hi,
    I've got this problem: I'd like to insert a styled text in some cells of a JTable.
    The text should be composed of two kinds of Font, to emphasize some characters in it.
    Suppose I've done a class Test, that extends JPanel. In this class I've done a method appendChar(String c, boolean bol). With this method I can add a JLabel with only a single char (String of length 1) at a time. If bol is true, it emphasizes the char; if false, it uses the "default" font. For example:
    "this is an example"
    This class works fine, but I don't have any idea on how I could be able to insert a Test instance in a JTable cell.
    I think I should create a class that implements TableCellEditor, or extends DefaultCellEditor.. but I don't know how this should be done.
    If there is some other way to have some styled text in a table cell, tell me!

    Hi,
    AFAIK, the default renderer for a table cell is a JLabel in which you can display styled text using html. You would need to provide a custom editor only if the default textfield doesn't fulfil your needs. For rendering, you need to override the renderer.
    Cheers,
    vidyut

  • Centering text in a cell in a JTable

    Hi,
    I have a program that reads in data from a text file and display it in a JTable. My problem is that the data in each cell is not centered, it is left justified within that cell.
    How can I fix this.
    --kirk                                                                                                                                                                                                                                                                                                                                                                                                                                            

    To align a text inside a cell you have to go through the rendering classes of a Jtable. You can do lots of formatting by using a render class. Heres my code that i use.
    1. The first code aligns your data centered inside the cell.
    2. The second code aligns it like code1 but has an additional character to be printed beside your data inside the text.
    ///////////// TO USE THE RENDER CODE IN YOUR APPLICATION /////
    TableColumn col1 = table.getColumnModel().getColumn(1);
    col1.setCellRenderer( new SimpleRenderer());
    or
    TableColumn col1 = table.getColumnModel().getColumn(1);
    col1.setCellRenderer( new SimpleRenderer( "$" ));
    ///////////// RENDER CODE IS HERE //////////////
    import javax.swing.table.*;
    import javax.swing.border.*;
    import javax.swing.*;
    import java.awt.*;
    public class SimpleRenderer extends JLabel implements TableCellRenderer
         Border unselectedBorder = null;
         Border selectedBorder = null;
         String text = "";
         Color foreColor = Color.black;
         Color backColor = new java.awt.Color( 217,217,255 );
         Color selectedColor = new java.awt.Color( 217,217,255 );
         public SimpleRenderer()
         super();
         setHorizontalAlignment( JLabel.CENTER );
         setOpaque( true );
         } // end of CONSTRUCTOR
         public SimpleRenderer( Color foreGround, Color backGround )
         super();
         setHorizontalAlignment( JLabel.CENTER );
         setOpaque( true );
         this.foreColor = foreGround;
         this.backColor = backGround;
         } // end of CONSTRUCTOR
         public SimpleRenderer( String data )
         super();
         text = data;
         setHorizontalAlignment( JLabel.CENTER );
         setOpaque( true );
         } // end of CONSTRUCTOR
         public Component getTableCellRendererComponent(
              JTable table, Object object, boolean isSelected, boolean hasFocus,
                                                                                    int row, int column)
         try
              if ( backColor != null )
                   if ( (row % 2 ) == 1 )
                             setBackground( backColor );
                   else
                             setBackground( Color.white );
              if ( foreColor != null )
                   setForeground( foreColor );
              if ( hasFocus )
                   if ( isSelected )
                             setBackground( selectedColor );
                   else
                             setBackground( Color.white );
              String newData = "" + object;
              if ( newData.trim().equals( "" ))
                   setText( "" );
              else
                   setText( text + " " + object );
              if (isSelected)
              if (selectedBorder == null)
                   Border border, raisedBevel, loweredBevel;
                   raisedBevel = BorderFactory.createRaisedBevelBorder();
                   loweredBevel = BorderFactory.createLoweredBevelBorder();
                   Border colorLine = BorderFactory.createLineBorder(Color.red);
                   border = BorderFactory.createCompoundBorder( raisedBevel,loweredBevel);
                   selectedBorder = BorderFactory.createCompoundBorder( border, colorLine);
              setBorder(selectedBorder);
              else
              if (unselectedBorder == null)
                        unselectedBorder = BorderFactory.createMatteBorder(0,0,0,0,
                        table.getBackground());
              setBorder(unselectedBorder);
         catch( ClassCastException e )
         return this;
         } // end of GETTABLECELLRENDERERCOMPONENT method.
         public void setForeColor( Color data )
         foreColor = data;
         } // end of SETFORECOLOR method.
         public void setBackColor( Color data )
         backColor = data;
         } // end of SETBACKCOLOR method.
    } /** end of CLASS **/
    /////////////

  • Export to excel with formatting was autowrapping text in a cell

    Export to excel with formatting was autowrapping text in a cell without having to check the can grow option.  When the can grow option is checked it does wrap the text however it spans multiple rows, which causes complications when trying to sort. 
    It worked in:
    ProductVersion=10.0.0.533
    ProductName=Crystal Enterprise 10 Embedded
    Doesnt work in:
    Crystal Reports 10.0 Service Pack 6
    After the upgrade the reports did not autowrap, b/c the "can grow" option was not checked.  I believe this was fixed by "ADAPT00305137 Patch ID: 36479914
    Description:
    When users export to Excel 97-2000 with the page-based format, text fields are wrapped, even when the "can grow" feature in the
    Designer is turned off." .   After we turn the option to grow on it does wrap however it spans across multiple rows.  So I guess my question is there a way for it not to span multiple rows when wrapping text?
    Edited by: dforde on Jan 27, 2010 11:12 PM

    I could be wrong, but I believe the export to excel option exports the database values, and the export to HTML exports the values seen in the sheets. If the database values are stored as seconds, the Excel will see them as seconds, and the data will have to be formatted properly in Excel.
    I haven't toyed around with Excel exports that much, but it might be possible to set up a template or macro in excel that would have the proper formatting, and use it when opening the Disco export.

  • Multi-coloured text in table cell

    I have a table where individual cells can have multi-coloured text. To do this I use html when I set the text in a cell renderer. It works fine. However, when the column width is too narrow for the text then the text is wrapped. If the text is not html then the text is not wrapped.
    How can I keep the different colours but make sure the text is not wrapped?
    Thanks

    I never want the text to wrap even if the column width is too small for the text.
    If the text of the renderer was set to abcdefghijklmnand the column is only large enough to show the first 10 chars then the user (obviously) would only see the first 10 chars.
    If I now set the text to <html>ab<font color="#ff0000">cde</font>fghijklmn</html> then, assuming the column is wide enough, the user will see all the text but cde is shown in red.
    However, if the column width is now changed so there is only room to show the first 10 chars then the user will only see abcde not as I would hope abcdefghij

  • Different color text in one cell

    How do I set a color for a group of words within a cell leaving the rest of the words black?
    I can make all the text within a cell the same color but when I select the words I want to be a different color the color selector in the toolbar goes away and only fx, Cancel and Accept buttons are available.

    If it is simple text, not the result of a formula, select the words you want to change and select another color from the toolbar or the color panel. That is, unless I didn't understand your request. I don't know where you are seeing Accept, Cancel and Fx.

  • How do I change the colour of text in a cell in a JTable?

    I am trying to change the color of the text in a single cell in a JTable. I have tried not adding a cell renderer and it changes the colour of text in all cells.
    I have tried adding a cell renderer to the table and it does the same ie all cells text colour changes.
    I am able to add a cell renderer to a column and it changes all the cells in the column.
    I cannot figure out how to change just one single cell's text colour without effecting the other cells.

    Ok, so if i create my own cell renderer do I set it as the default renderer for the whole table i.e.
    table.setDefaultRenderer(MyCellRenderer, renderer);
    Does this set one cell renderer for the whole table or is there an individual one for each cell?

  • If Number = than then display text from another cell

    Hi
    I'd appreciate it if anyone can help me with this please.
    I am putting together a gradebook type spreadsheet. I would like to display the text from another cell if the number entered in another cell is greater than or less than a certain number.
    So - if the number in cell A is equal to or greater than 70 then the text displayed in cell B equals the text contained in cell C
    Hope this makes sense.
    Many thanks in advance.
    regards,

    Hello Lee,
    The Numbers User Guide PDF available from the Numbers Help menu as a download is good reading for beginners. As a reference document, the iWork Formulas and Functions User Guide is also valuable.
    The function you need is called "IF", and the syntax is: IF "logic-expression" is true, then do this, else do this. As a calculation in a cell, that would have the form: =IF("Cell A" is equal to or greater than 70, then display the content of cell C, else display "something else") You need to provide the "something else", which can be a null string, "", if you wish.
    As you will find when you read the guide, the cells all have row and column address components where the column is identified by a letter of the alphabet and the row by a number. So If your data is in A1, your text string in B1 and your expression is in C1, you would write in C1:
    =IF(A1>=70, B1, "")
    Does this help?
    Jerry

  • How to set the text of a cell in Numbers to vertical direction? Tks.

    Hi
    In Numbers, please tell me how to switch the text of a cell to vertical direction?
    Tks.

    Hi Kyle,
    In Numbers, nothing having to do with a table can be rotated. (In Pages an entire Table can be rotated, but not text within a Table.)
    There have been many suggestions posted here over the life of iWork for vertical labels. Most fall into three categories:
    1. Type one letter, Option-Return, type another letter, Option-Return, and so forth.
    2. Type label in a Text Box, rotate the box, position the box over the table, covering the cell where you need a label.
    3. Create a PDF graphic with rotated text and insert it into table cell as Background Fill.
    The third option is clearly the best. The steps for option three are:
    Insert Text Box
    Type label into the box
    Rotate the text box
    Select the text box (not the text inside the box)
    Command-C
    Switch to Preview.app
    Command-N
    Command-C
    Switch to Numbers
    Click on Cell where the label goes
    Command-V
    It sounds worse than it is. You can reuse the Text Box so you don't end up with a sheet full of them.
    Regards,
    Jerry

  • How do I move text within a cell down in "Numbers" please?

    I am trying to move text within a cell down in Pages. I use one cell as a topic and then add text in the  next row of a cell. It may seem strange to some but I have been doing it for years in Excel. Here is the best example I can give here:
    Customer
    Customer Notes
    ABC Company
    Imagine a long row of text here and I want to start a new line of text below this one without (within the same cell)
    Text would continue here but still within the same cell (I use to be able to just hit return in excel)
    Any ideas would be appreciated.
    Thanks so much! ;-)
    Thanks so much!

    Thanks so much Wayne... I spent quite a while searching for this to no avail lol.Have a great day!

  • Regarding inserting a field or text in template cell

    Hi Experts,
    Please let me know how to insert a field or text in the Cell in template.
    I created  template
    C1     1     14                             20.00     MM     8.00     CM     4.00   CM 4.00     CM                CM
    i have 14 lines and 3 columns in it
    i need to insert the feilds and text in it.
    Please let me know ,how to proceed.
    Thanks in advance.
    regards
    Vishnu

    Hi,
    To insert the text and field value inside the template you need to add insert the text inside the tempate node.
    assign the text or field into the text and then decide the position of the ext in the templete in output condition tab or text.
    insert the row and column number in the this to filed where you want to display the text.
    for e.g if field needs to displayed in the 2nd row and 3rd column then mention line = 2 and column = 3 in the output tab of the text.

  • Is it possible to apply conditional formatting to a cell (or range) based upon a LOOKUP query to cell values in another sheet.? I want to alter the formatting (i.e., text and/or cell background color), but not cell content.

    Is it possible to apply conditional formatting to a cell (or range) based upon a LOOKUP query to cell values in another sheet.?
    I want to alter the formatting (i.e., text and/or cell background color), but not the content, of the target cell(s).

    Hi Tom,
    Your LOOKUP formula will return a value that it finds in the "other" table. That value can be used in conditional highlighting rules. (Numbers 3 calls it conditional highlighting, not conditional formatting. Just to keep us awake, I guess, but it works the same).
    Please explain what you are trying to do.
    Regards,
    Ian.

  • Tableview custom cell problem

    Hi everyone.
    I created a iOS tabbed application using xcode 4.2 and storyboard. I added one tableviewcontroller with custom cell on it, when clicking the row, I want to open one tableviewcontroller, i used the following code below
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
        categoryClass *cc = [datas objectAtIndex:indexPath.row];
        [tableView deselectRowAtIndexPath:indexPath animated:NO];
        iSubProducts *subProducts = [[iSubProducts alloc] init];
        subProducts.title = cc.categoryName;
        subProducts.catID = cc.categoryID;
        [[self navigationController] pushViewController:subProducts animated:YES];
        [subProducts release];
    but when I click the row it gives me the following error:
    *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath
    on my iSubProducts tableviewcontroller, i have the following:
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
        static NSString *CellIdentifier = @"myCell2";
        iSubProductsCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        productSubClass *cc = [datas2 objectAtIndex:indexPath.row];
        NSLog(@"Product Name: %@", cc.productName);
        cell.txtProductName.text  = cc.productName;
        cell.txtProductDesc.text = cc.productDesc;
        return cell;
    I assume this is where the error occurs, the cell is returning a nil value. When I try to attach the iSubProducts tableviewcontroller using or from a button, it all works fine, but if its coming from row clicked, this error shows up.
    Im quite new with iOS development, and maybe there is a error opening tableviewcontroller from a tableviewcontroller with a custom cell on it. I've been bangin my head for 2 days now and googled a lot, unfortunately I didn't find any solution. I'm pretty sure there's no error on the iSubProducts tableviewcontroller since its working if i tried pushing it from a button. Please I need advice on this one, Im so stucked right now with this issue. Thank you everyone.

    Hi,
    you need to create a tableViewCell in case the dequeueReusableCell-call doesn't return one.
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
        static NSString *CellIdentifier = @"myCell2";
        iSubProductsCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if (cell == nil)
            cell = (iSubProductCell *)[[UITableViewCell alloc] init....
        productSubClass *cc = [datas2 objectAtIndex:indexPath.row];
        NSLog(@"Product Name: %@", cc.productName);
        cell.txtProductName.text  = cc.productName;
        cell.txtProductDesc.text = cc.productDesc;
        return cell;
    Dirk

  • Dragging Text in Table Cell

    In older versions of Pages, dragging text from a table cell into another table cell would cause the 2 cells to swap text. In '09 the dragged text overwrites the text in the cell it's dropped into. Is there a way to go back to the old way?

    No not that I know of.
    I have tried all the possible keyboard combinations and none do what you want.
    Peter

Maybe you are looking for

  • How do I open a port needed to run an application when I am using wireless internet at a hotel? Specifically port 13000?

    Hi all! I am trying to use an application called freephoneline.ca which gives you a phone number that people can call via an app on your computer. It was working perfectly at home but now I am at a hotel and I am not getting any sound. From running a

  • POP sound come out from air vent

    Hi every mac user out there, My MacBook pro 15 inch recently don't know why, start to have a pop sound out from the back of my MacBook pro's air vent, this started after I open the below case just for checking(because last time I saw a little tiny bu

  • Searching pdfs in an internet knowledge center

    after creating pdfs and uploading them to our knowledge center we are unable to search on text. only the title and description is searched. how do you make pdf text, the whole document, searchable on a knowledge center?

  • Change Font in N73

    Dear sir, I'm using N73 ME and my sw version is V 3.0638.0.0.30 30-10-2006 RM-133 Nokia N73 (15) I would like to know how to increase the font size or may I change font to my N73 to be unique... Thanks in advance BabyBirth

  • Flash loop please help

    I have a jet_mc object flying from left to right, i got that part ok but my question is how can make it fly from left to right again and again untill the user finish the game. what line of code should i add to make it loop. Thank you stage.addEventLi