Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2007
    Posts
    137
    Thanks
    5
    Thanked 0 Times in 0 Posts

    line break between <div>

    below is two pieces of DIV code one for the left and other for the right.. i wil want to repeat these boxes twice or thrice...When i do it... I am not able to give a space between the two or three sets... the borders overlap.. Since i have give boders i want those to be distint for all the boxes... of all sets.. have attached the css code also

    PHP Code:
    <div id="boxleft">
        <
    h2>The idea behind the design</h2>
        <
    p>When it was time to redesign one of my sitesI got an idea about making one single design that all of my sites could use, and make some kind of official link network between the sitesMy way of doing this turned out to be the use of toptabs (for selecting a website) and navitabs (for selecting subsections within the different sites). With a basic PHP templateall sites could now have the same design and share the same toptabs but they can have their own separate content. If neededeach navitab can have a submenu in the sidebarwhich allows this design to handle hundreds of pages while still keeping a quick and easy navigationTo make navigation more logicaleach tab could have its own colorscheme or header image.</p>
        <
    class="block"><strong>Please note:</strongThis template is built with XHTML and CSS code onlyIt contains no CMS-specific codeIt may be customized to work with many different content management systemsbut that will require additional programming.</p>
      </
    div>
      <
    div id="boxright">
        <
    h2>The idea behind the design</h2>
        <
    p>When it was time to redesign one of my sitesI got an idea about making one single design that all of my sites could use, and make some kind of official link network between the sitesMy way of doing this turned out to be the use of toptabs (for selecting a website) and navitabs (for selecting subsections within the different sites). With a basic PHP templateall sites could now have the same design and share the same toptabs but they can have their own separate content. If neededeach navitab can have a submenu in the sidebarwhich allows this design to handle hundreds of pages while still keeping a quick and easy navigationTo make navigation more logicaleach tab could have its own colorscheme or header image.</p>
        <
    class="block"><strong>Please note:</strongThis template is built with XHTML and CSS code onlyIt contains no CMS-specific codeIt may be customized to work with many different content management systemsbut that will require additional programming.</p>
      </
    div
    PHP Code:
    #boxleft {
    float:left;
    width:46%;
    border:1px solid #d8d8d8;
    padding:5px 10px 0 10px;
    border-bottom:0px;
    }


    #boxright {
    float:right;
    width:46%;
    border:1px solid #d8d8d8;
    border-bottom:0px;
    padding:5px 10px 0 10px;

    and please tell me how to space the two adjacent boxes with a very small space between them... i ahve used a tril and error % factor to do it rite now...
    is there a better way to do it ??

    When these boxes repeat the borders overlap... how to make it give a line break... <br/> didnt help

  • #2
    Regular Coder
    Join Date
    Jan 2007
    Posts
    137
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Sorry... i founnd the Solution

    <br clear="all" />


    may be use full for others...
    this code clears and make a line break


    Code:
        Syntax  	<BR>
        Attribute Specifications 	
    
            * CLEAR=[ left | all | right | none ] (clear floating objects)
            * core attributes
    
        Contents 	Empty
        Contained in 	Inline elements, block-level elements
    
    
    Details
    
        The BR element forces a break in the current line of text. BR can be useful in formatting addresses within the ADDRESS element, but it is often misused to break lines of text in a paragraph or table cell when it looks "nice" to the author. This usually results in an awkward presentation when viewed with a font size other than that used by the author.
    
        The CLEAR attribute of BR is used to move below floating objects (typically images or tables). In the following example, the second paragraph should be rendered below the floating image:
    
        <P><IMG SRC="toronto.jpg" ALIGN=left ALT="" TITLE="Toronto's CN Tower">Toronto is the largest city in Canada and the fourth largest in North America.</P>
        <BR CLEAR=left>
        <P>The city is highly multicultural, with over 80 ethnic communities from Africa, Asia, and Europe...
    
        Style sheets provide more flexibility in controlling text flow around objects and eliminate the need to use BR for this purpose since CSS1's clear property can be applied to any element (such as the second paragraph in the preceding example).

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,859
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    clear= is depreciated. have a look at http://www.w3.org/TR/html4/present/g...tml#adef-clear

    Use its equivalent style style="clear:both"
    http://www.w3schools.com/htmldom/prop_style_clear.asp
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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