SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2005
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    My <strong> tags causing a line break?

    Code:
    <strong>MATERIALS:</strong>&nbsp; Outer 100% wool, Lined with black rayon<br />
    <strong>SIZE:</strong> 12<br />
    The above code is being rendered like this

    MATERIALS:
    Outer 100% wool, Lined with black rayon
    SIZE:
    12

    When I want it like this

    MATERIALS: Outer 100% wool, Lined with black rayon
    SIZE: 12

    Heres the html from viewing the source of the page,

    HTML Code:
    <strong>MATERIALS:</strong>
    &nbsp; Outer 100% wool, Lined with black rayon
    <br>
    <strong>SIZE:</strong>
    12
    <br>
    This is using a zencart template from template monster and the CKeditor text editor.
    I have the same issue on another zencart site also. I cant see any css that would cause it.
    the site is offline now so I cant show it to you but any help really appreciated.

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    9 Thread(s)
    Hi,
    If you can alter the CSS, add this:
    Code CSS:
    strong{display: inline;}
    and see if that makes a difference.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,598
    Mentioned
    411 Post(s)
    Tagged
    7 Thread(s)
    Yes, Pullo's suggestion is worth trying. The HTML you posted should appear the way you want, so it seems there's a style in your CMS like

    Code:
    strong {display: block;}
    To override it, you may need

    Code:
    strong {display: inline !important}
    ... though it may mess up other parts of your site.

    It's a pretty rotten thing to do to you, though, to set <strong> to display: block.

  4. #4
    SitePoint Zealot
    Join Date
    Feb 2005
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I will be trying this today.
    Template monster do a lot of bad things, a lot of templates have the bullet points from ul missing for example, adding them in puts bullet points all over the site in the strangest places..
    Takes a bit to get it sorted.

  5. #5
    SitePoint Zealot
    Join Date
    Feb 2005
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome thanks people, you pinpointed the issue. There was this in there

    .description strong{ color:#000; display:block;}

    Not sure why they would do that....

  6. #6
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    9 Thread(s)
    Glad to hear you got it sorted out.

  7. #7
    SitePoint Enthusiast polyhedra's Avatar
    Join Date
    Nov 2011
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A basic cascading style sheet will make it look like this, used the unorded list which actually is the trick.

    Code:
    <html>
    <head>
    <style>
    p {
    display: inline;
    }
    
    ul{
    list-style: none;
    margin: 0;
    padding: 0;
    }
    
    li{
    margin: 0;
    padding: 0;
    }
    
    </style>
    <head>
    <body>
    <ul>
    <li><strong>MATERIALS:</strong><p>Outer 100% wool, Lined with black rayon</p></li>
    <li><strong>SIZE:</strong><p>12</p></li>
    </ul>
    </body>
    </html>
    Last edited by TechnoBear; Sep 13, 2012 at 03:09. Reason: Fixed code tags


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
  •