Professional Web Applications Themes

"break line" with CSS? - HTML & CSS

(i hope this is a better group for my question!) ----------- i added a clear when i detect the year changes echo "<br class='clearboth'>"; ..clearboth {clear: both;} it works almost fine, only that it moves all images as a block below, i.e., outside its container (RIGHT) layout: HEADER LEFT RIGHT .... ... left end right end 2006 img img img 2005 img img 2004 img img img img thanks for your help G wrote: > Clear: both > I think its under display, and I think you might have to setup the display:block as well ... > > G > ...

  1. #1

    Default Re: "break line" with CSS?

    (i hope this is a better group for my question!)
    -----------
    i added a clear when i detect the year changes

    echo "<br class='clearboth'>";


    ..clearboth {clear: both;}

    it works almost fine, only that it moves all images as a block below,
    i.e., outside its container (RIGHT)

    layout:

    HEADER
    LEFT RIGHT
    .... ...



    left end right end

    2006 img img img
    2005 img img
    2004 img img img img

    thanks for your help

    G wrote:
    > Clear: both
    > I think its under display, and I think you might have to setup the
    display:block as well ...
    >
    > G
    > [url]www.AmericanCards.net[/url]
    >
    > "John Doe" <jdoe_nstelefonica.net> wrote in message
    news:dsdrvj$fl2$1forums.macromedia.com...
    >
    >> hi:
    >>
    >> i'm retrieving data from a MySQL DB and showing thumbnails grouped
    by year using DIV's. i know how to check in PHP when the year changes.
    my problem is how to "break line" with CSS
    >>
    >> what i want:
    >>
    >> 2006 img img img
    >> 2005 img img
    >> 2004 img img img img
    >> ...
    >>
    >> what i have now:
    >>
    >> 2006 img img img 2005 img img 2004 img img img img
    >>
    >> styles:
    >>
    >> .e_year {
    >> float:left;
    >> width:54px;
    >> height:39px;
    >> margin-right: 0px;
    >> padding-right: 23px;
    >> font-family:Arial;
    >> font-weight:bold;
    >> font-size:15px;
    >> color:#222222;
    >> }
    >> .tnContainer {
    >> float:left;
    >> width:54px;
    >> height:39px;
    >> margin: 0px;
    >> padding-right: 10px;
    >> }
    >>
    >> tia,
    >>
    >> jdoe
    John Doe Guest

  2. #2

    Default Re: "break line" with CSS?

    Why not try adding <img style="display:block;"> instead of the float clear?

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "John Doe" <jdoe_nstelefonica.net> wrote in message
    news:dsg05m$fl8$1forums.macromedia.com...
    > (i hope this is a better group for my question!)
    > -----------
    > i added a clear when i detect the year changes
    >
    > echo "<br class='clearboth'>";
    >
    >
    > .clearboth {clear: both;}
    >
    > it works almost fine, only that it moves all images as a block below,
    > i.e., outside its container (RIGHT)
    >
    > layout:
    >
    > HEADER
    > LEFT RIGHT
    > ... ...
    >
    >
    >
    > left end right end
    >
    > 2006 img img img
    > 2005 img img
    > 2004 img img img img
    >
    > thanks for your help
    >
    > G wrote:
    >
    > > Clear: both
    > > I think its under display, and I think you might have to setup the
    > display:block as well ...
    > >
    > > G
    > > [url]www.AmericanCards.net[/url]
    > >
    > > "John Doe" <jdoe_nstelefonica.net> wrote in message
    > news:dsdrvj$fl2$1forums.macromedia.com...
    > >
    > >> hi:
    > >>
    > >> i'm retrieving data from a MySQL DB and showing thumbnails grouped
    > by year using DIV's. i know how to check in PHP when the year changes. my
    > problem is how to "break line" with CSS
    > >>
    > >> what i want:
    > >>
    > >> 2006 img img img
    > >> 2005 img img
    > >> 2004 img img img img
    > >> ...
    > >>
    > >> what i have now:
    > >>
    > >> 2006 img img img 2005 img img 2004 img img img img
    > >>
    > >> styles:
    > >>
    > >> .e_year {
    > >> float:left;
    > >> width:54px;
    > >> height:39px;
    > >> margin-right: 0px;
    > >> padding-right: 23px;
    > >> font-family:Arial;
    > >> font-weight:bold;
    > >> font-size:15px;
    > >> color:#222222;
    > >> }
    > >> .tnContainer {
    > >> float:left;
    > >> width:54px;
    > >> height:39px;
    > >> margin: 0px;
    > >> padding-right: 10px;
    > >> }
    > >>
    > >> tia,
    > >>
    > >> jdoe

    Murray *TMM* Guest

  3. #3

    Default Re: "break line" with CSS?

    Murray *TMM* wrote:
    > Why not try adding <img style="display:block;"> instead of the float clear?
    do you mean adding style="display:block;" to the image tag only when the
    year change? if it is, i tried without success. not sure if i'm catching
    your idea

    BTW, i don't know if has any influence, the years are texts not images,
    retrieved from the DB and stored in an array.

    i guess the problem is related with generating the DIV's inside another
    DIV's. this is the original code:

    <?php
    $actYear = 0;
    for ($i=0; $i<$al; $i++) {
    if ($e_year[$i] <> $actYear) {
    echo "<DIV class='e_year'>".$e_year[$i]."</DIV>";
    $actYear = $e_year[$i];
    }
    echo "<DIV class='tnContainer'><A href='...')>
    <IMG src='...' border='0'></A></DIV>";
    }
    ?>

    thanks for your advice

    John Doe Guest

  4. #4

    Default Re: "break line" with CSS?

    > do you mean adding style="display:block;" to the image tag only when the
    > year change? if it is, i tried without success. not sure if i'm catching
    > your idea
    Yes, that's what I mean. By making that last image display:block, any
    subsequent adjacent content will be forced to the next line. It should
    work....

    But let's get pragmatic. How about adding a <br> tag?

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "John Doe" <jdoe_nstelefonica.net> wrote in message
    news:dsg9hb$t0t$1forums.macromedia.com...
    > Murray *TMM* wrote:
    >
    >> Why not try adding <img style="display:block;"> instead of the float
    >> clear?
    >
    > do you mean adding style="display:block;" to the image tag only when the
    > year change? if it is, i tried without success. not sure if i'm catching
    > your idea
    >
    > BTW, i don't know if has any influence, the years are texts not images,
    > retrieved from the DB and stored in an array.
    >
    > i guess the problem is related with generating the DIV's inside another
    > DIV's. this is the original code:
    >
    > <?php
    > $actYear = 0;
    > for ($i=0; $i<$al; $i++) {
    > if ($e_year[$i] <> $actYear) { echo "<DIV
    > class='e_year'>".$e_year[$i]."</DIV>";
    > $actYear = $e_year[$i];
    > }
    > echo "<DIV class='tnContainer'><A href='...')>
    > <IMG src='...' border='0'></A></DIV>";
    > }
    > ?>
    >
    > thanks for your advice
    >

    Murray *TMM* Guest

Similar Threads

  1. Replies: 0
    Last Post: January 8th, 04:27 AM
  2. Undoing "Break apart" (ctrl-B)
    By Toby in forum Macromedia Flash
    Replies: 5
    Last Post: May 3rd, 07:59 AM
  3. CFINPUT type="radio" w/ "value" requires "label"
    By Iceborer in forum Macromedia ColdFusion
    Replies: 2
    Last Post: February 21st, 06:16 PM
  4. "Break link to symbol" broken
    By emencz@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 2
    Last Post: May 11th, 02:21 PM
  5. "Start" "Program" "Menu" list is empty
    By Pete in forum Windows XP/2000/ME
    Replies: 2
    Last Post: July 10th, 10:42 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139