SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Addict
    Join Date
    Nov 2012
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is it possible to do anything with this ?

    My web pages are mainly census transcriptions and so are in tabular form.

    I have two queries; one which I guess is straightforward; one not so;

    OK: Q 1

    When the enumerator left a line blank, then if I do that in the table, the cells contact in height and just show the borders. I know that if I put an   in one cell it looks fine, but that seems cheating. Is there a proper way to show a whole table row which is emply without doing that.

    As for Q 2; I don't think this is possible.

    At present page summaries contain something like this

    TOTAL In}
    Page 25 }

    I have styled the page so that the two curly brackets line up under each other. However the original only has one bracket with the point between the two lines of text. I can't imagine how this can be achieved on a web page. Can it ?

    An example of the page is here: http://www.c5d.co.uk/ed12.php

    Thanks

    Antony

  2. #2
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by certificates View Post
    Q 1

    When the enumerator left a line blank, then if I do that in the table, the cells contact in height and just show the borders. I know that if I put an  * in one cell it looks fine, but that seems cheating. Is there a proper way to show a whole table row which is emply without doing that.
    If it's just a case of creating the height then you can set td {height:1.5em;}, which will work even if you have empty cells, but depending on your borders and background that might not be enough to do the trick ... if not, you have to fall back on the slightly clunky  , I'm afraid.

    As for Q 2; I don't think this is possible.

    At present page summaries contain something like this

    TOTAL In}
    Page 25 }

    I have styled the page so that the two curly brackets line up under each other. However the original only has one bracket with the point between the two lines of text. I can't imagine how this can be achieved on a web page.
    Easy There are various ways of doing this.

    One is to put the } in a <div> and give it float:right; text-size:2em; (of course, it then needs to come before the cell contents, which is slightly odd, but there you go).

    Two is to split the cell into two, and then in the right hand cell you can just have a very big }

    Three is to create an image of the } at the size you need and then on those cells where you need it, apply it as a background image with the appropriate position and padding.

  3. #3
    SitePoint Addict
    Join Date
    Nov 2012
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your thoughts.

    With regards to point 1; I have given the <td> a style and it works fine. Thanks

    However with regard to the curly bracket, I appear to be missing something in what you are trying to tell me.

    I understand the option with the image, but I am loathe to use an image if it is avoidable.

    With regard to splitting the cell, I am lost here. This is part of a table, and there is something in all of the cells in the row. If I add another cell to the row, then the table is not evenly constructed. and one bit will stick out at the side. Did you mean to add a column. and colspan everything but the rows that have the bracket ?


    I did try the <div option> I tried <td><div class="float:right; text-size:2em;">&#125;</div>TOTAL In<br>Page 25</td> but it didn't seem to do anything at all.

    Have I misunderstood your intention ?

    Thanks

    Antony

  4. #4
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,343
    Mentioned
    192 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by certificates View Post
    I did try the <div option> I tried <td><div class="float:right; text-size:2em;">}</div>TOTAL In<br>Page 25</td> but it didn't seem to do anything at all.

    Have I misunderstood your intention ?

    Thanks

    Antony
    You appear to have made a mistake in your markup.
    You want either
    Code:
    <td><div style="float:right; text-size:2em;">}</div>TOTAL In<br>Page 25</td>
    Or, avoiding inline styling

    Code:
    <!- the following style goes in the head of the page or in a separate CSS file -->
    <style>
    .right_bracket { float:right; text-size:2em;}
    </style>
    
    <td><div class="right_bracket">}</div>TOTAL In<br>Page 25</td>
    {Forgive me, Stevie, for butting in here}
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Git is for EVERYONE
    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains

  5. #5
    SitePoint Addict
    Join Date
    Nov 2012
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the suggestion, but I couldn't get it to work.

    I tried both the in line styling and the style sheet option.

    The page it is in is http://www.c5d.co.uk/1841ed1.php and obviously it's the page 25 summary part way down.

    Would you perhaps have a look at the coding on that cell and see what is awry please ?

    Thanks

    Antony

  6. #6
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by certificates View Post
    With regard to splitting the cell, I am lost here. This is part of a table, and there is something in all of the cells in the row. If I add another cell to the row, then the table is not evenly constructed. and one bit will stick out at the side. Did you mean to add a column. and colspan everything but the rows that have the bracket ?
    Yes, it would mean putting a colspan=2 on every other cell in that column. Fortunately, because it's always the first cell in the column, it's very easy to do with a simple find-and-replace:
    (using MS Word syntax to get the line breaks):
    <tr>^p<td> to <tr>^p<td colspan="2">
    Then just remove the colspan on those cells where you want to put in the curly braces, and add in the extra cell by hand. This would, of course, mean that you would have a border between those cells, unless you put
    style="border-right:none; on the left one and style="border-left:none; on the right one (or better to do it via a class in the stylesheet). It's a bit of a hack, but quite frankly anything is when you're going for this type of output.


    Quote Originally Posted by certificates View Post
    I tried both the in line styling and the style sheet option.

    The page it is in is http://www.c5d.co.uk/1841ed1.php and obviously it's the page 25 summary part way down.

    Would you perhaps have a look at the coding on that cell and see what is awry please ?
    What's awry is that you haven't done anything to the code

    Looking at your source code, it still says
    HTML Code:
    <td>TOTAL In<span class="totalpadding3">&#125;</span>
    <br>Page 25<span class="totalpadding2">&#125;</span></td>
    so you haven't uploaded the right version of the page with the float on it!

  7. #7
    SitePoint Addict
    Join Date
    Nov 2012
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for looking again.

    I'm sorry though, it's beyond me. I have copied and pasted exactly and the bracket remains on the first line and refuses to bracket both lines.

    Using Chrome, I checked the element and the .right_bracket { float:right; text-size:2em;} from the style sheet doesn't seem to be there.

    Thanks for trying anyway

    Antony

  8. #8
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,364
    Mentioned
    268 Post(s)
    Tagged
    5 Thread(s)
    Um ... shouldn't that be font-size, rather than text-size?

  9. #9
    SitePoint Addict
    Join Date
    Nov 2012
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It certainly should because using font instead of text makes it work perectly.

    Thanks very much to all contributors

    Antony

  10. #10
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,364
    Mentioned
    268 Post(s)
    Tagged
    5 Thread(s)
    Quote Originally Posted by certificates View Post
    It certainly should because using font instead of text makes it work perectly.
    Excellent.

    I wouldn't like to say how many times I've made the same mistake. Fortunately, the editor I use now presents a list of possible options when I start to type, so if I get as far as typing "text" and "size" isn't on the list, I know I've screwed up somewhere and can correct it there and then. Thank you, Bluefish.

  11. #11
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,343
    Mentioned
    192 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by TechnoBear View Post
    Um ... shouldn't that be font-size, rather than text-size?
    One of the [many] ways in which CSS infuriates me is the inconsistencies. You hit upon the biggest; font-size versus text-decoration
    I am constantly confused by that one (among a few others).
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Git is for EVERYONE
    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •