Web Analytics Made Easy -
StatCounter How can I define the size of line breaks? - CodingForum

Announcement

Collapse
No announcement yet.

How can I define the size of line breaks?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I define the size of line breaks?

    Hello, I'm trying to format my site to work better with browsers other than Internet Explorer. One of the things I noticed is that different browsers seem to interpret the <br> tags differently, or at least the amount of space they consist of. I was wondering if it's possibly to specify the height of a line break using css to a certain number of pixels that'd display similar results with different browsers. Any help would be greatly appreciated. Thanks.

  • #2
    Hi there JoshF,

    and a warm welcome to these forums.

    You have at least 85 errors that need to be attended to........before it is posible to address your problem.

    coothead
    ~ the original bald headed old fart ~

    Comment


    • #3
      Thanks for the reply.

      Okay, I've gotten a practice page to 54 errors is that good enough?

      For some reason when I look at this page in Firefox now the main content frame doesn't stretch to the bottom of the screen.

      I don't know if this matters but the page is shtml not xhtml.

      Comment


      • #4
        Try adding something like:

        html, body{
        height:100%
        }

        to your styles. I haven't looked at your page, but this may help.
        Active PHP/MySQL application developer available for immediate work.
        syosoft.com mavieo.com - Remote Web Site Administration Suite - Reseller Ready

        Comment


        • #5
          That's whats weird, I already have that, and it seems to work in IE but not Firefox.

          Comment


          • #6
            Originally posted by JoshF View Post
            One of the things I noticed is that different browsers seem to interpret the <br> tags differently, or at least the amount of space they consist of.
            The size of line-breaks is relative to either the font size, the line-height, or both. If the font size varies, of course, the size of line-breaks will vary too. If you're using line-break elements to do anything other than break some text to the next line, i.e., using them to create vertical space, then you shouldn't be though; margin, padding, and other CSS properties are more suitable for that.

            Originally posted by JoshF View Post
            Okay, I've gotten a practice page to 54 errors is that good enough?
            Considering how easy most of those errors are to fix I don't see why you shouldn't take the trouble. You're using deprecated attributes; missing required attributes; have unescaped ampersands; have attribute values that are not delimited by quotation marks (invalid XHTML); have unclosed elements (again, invalid XHTML); and have elements that don't exist under the XHTML 1.0 Strict DTD (iframe, font). It looks like there's also some ineffective JavaScript; why would you use JavaScript to document.write a reference to more JavaScript? Then again that poorly written script and the iframes may be the fault of some poorly engineered ad-insertion by your host, in which case you can't be blamed. I would at least switch to a transitional doctype so that the iframes, and other code which you may be required to have, are valid though.

            Originally posted by JoshF View Post
            For some reason when I look at this page in Firefox now the main content frame doesn't stretch to the bottom of the screen.
            Your problem in Firefox may be related to the fact that Firefox is rendering your page in quirks mode. I'm not sure why though since the doctype declaration that you're using (XHTML 1.0 Strict) should be activating standards-compliance mode. Maybe it has something to do with this SHTML thing? You can find some more information about layout modes at http://hsivonen.iki.fi/doctype/.

            Comment

            Working...
            X