HTML Help
HTML Help Central . com

» Online Users: 47

0 members and 47 guests
No Members online
Most users ever online was 695, 02-16-2011 at 08:01 AM.

» Site Navigation

 > FAQ

» Domains For Sale

Page 1 of 2 1 2 LastLast
Results 1 to 15 of 16

Thread: thin red line

  1. #1
    kervinj Guest

    Post thin red line

    I want to insert a thin line of a contrasting color under the heading of my pages. I wrote code for a table with the selected bgcolor and a table height of 2 pixels. It works great in MSIE but not in Netscape. I added the non-breaking space but this made the line too thick. I coded the non-breaking space to have a relative font size of -6. It reduced the thickness some but not enough. Any suggestions?

  2. #2
    Join Date
    Dec 2000
    Location
    Wales, UK
    Posts
    1,780

    Post

    Could you try a Horizontal Rule?

    e.g.

    <HR ALIGN="center" SIZE="2" WIDTH="200" COLOR="red">

    Change the attributes to what you wish.


    ------------------
    Neil "Mr Moderator" Graddage - neil@htmlhelpcentral.com
    Sites: 1 - All others still under construction
    Visit the Forum FAQ

  3. #3
    kervinj Guest

    Post

    Originally posted by Greatgraddage:
    Could you try a Horizontal Rule?

    e.g.

    <HR ALIGN="center" SIZE="2" WIDTH="200" COLOR="red">

    Change the attributes to what you wish.


    This does not work either. It puts the HR spaced below the heading and shows white spage between. I also tried to create a thin line image and insert it as a table bg image. This had similar effects as I mentioned in my first message. Does netscape not support tables unless something is in the cell? Is there a way to get the table height thinner? I could create the image and insert it into a table cell. However, the problem will occur that depending on the settings for the various monitor dimensions, this could cause a scroll over or seeing the end of the line--which I want the avoid.
    KJ


  4. #4
    Join Date
    Dec 2000
    Location
    Wales, UK
    Posts
    1,780

    Post

    Originally posted by kervinj:
    Does netscape not support tables unless something is in the cell?
    Nope. Akward bugger innit

    Originally posted by kervinj:
    Is there a way to get the table height thinner?
    Have you used CELLSPACING="0" CELLPADDING="0" BORDER="0"?



    ------------------
    Neil "Mr Moderator" Graddage - neil@htmlhelpcentral.com
    Sites: 1 - All others still under construction
    Visit the Forum FAQ

  5. #5
    kervinj Guest

    Post

    Originally posted by Greatgraddage:
    Have you used CELLSPACING="0" CELLPADDING="0" BORDER="0"?

    Yes. I have set these table attributes to "0".
    KJ

  6. #6
    Join Date
    Dec 2000
    Location
    Wales, UK
    Posts
    1,780

    Post

    Try adding vspace="0" and hspace="0" (thanks again Ben_C) to your <TABLE> tag.

    ------------------
    Neil "Mr Moderator" Graddage - neil@htmlhelpcentral.com
    Sites: 1 - All others still under construction
    Visit the Forum FAQ

  7. #7
    kervinj Guest

    Post

    Originally posted by Greatgraddage:
    Have you used CELLSPACING="0" CELLPADDING="0" BORDER="0"?


  8. #8
    kervinj Guest

    Post

    It works great in MSIE but not in NetScape. Any other suggestions?

    Originally posted by kervinj:

  9. #9
    Join Date
    Dec 2000
    Location
    Wales, UK
    Posts
    1,780

    Post

    No, sorry. I am guessing you are trying to underline your headings right?

    Could you have it all in one image?



    ------------------
    Neil "Mr Moderator" Graddage - neil@htmlhelpcentral.com
    Sites: 1 - All others still under construction
    Visit the Forum FAQ

  10. #10
    kervinj Guest

    Post

    Originally posted by Greatgraddage:
    No, sorry. I am guessing you are trying to underline your headings right?

    Could you have it all in one image?

    I was trying to avoid this because of the browser problems this brings about with different monitor sizes. If the image is an exact size, this will happen. That is why the table option would seemingly work so well. The design I am aiming for is just a nice, thin contrasting band of color to frame and separate the heading from the body of the page.
    KJ

  11. #11
    Join Date
    Dec 2000
    Location
    Wales, UK
    Posts
    1,780

    Post

    Try putting the text and the line into a table

    e.g.

    <TABLE ......>
    <TR>
    <TD....>
    HEADING
    </TD>
    </TR>
    <TR>
    <TD...>
    LINE
    </TD>
    </TR>
    </TABLE>

    Where .... stands for the attributes you want to use.

    I doubt it will work but its worth a go.

    ------------------
    Neil "Mr Moderator" Graddage - neil@htmlhelpcentral.com
    Sites: 1 - All others still under construction
    Visit the Forum FAQ

    [This message has been edited by Greatgraddage (edited 08-01-2001).]

  12. #12
    Join Date
    Jun 2001
    Location
    Peoria, IL
    Posts
    521

    Post

    You could use an image without getting in too much trouble with monitor sizes and resolutions. You could use a 1X1 pixel GIF of whatever color you wanted, then define it's settings like this:

    <img src="red.gif" width="100%" height="1">

    Simple as that. I realize you want to keep it standard at all resolutions on all browsers at all different sizes, and a table bgcolor is much less effective in that than using an image. I think you've demonstrated that pretty effectively.

  13. #13
    kervinj Guest

    Post

    Originally posted by wasson:
    You could use an image without getting in too much trouble with monitor sizes and resolutions. You could use a 1X1 pixel GIF of whatever color you wanted, then define it's settings like this:

    <img src="red.gif" width="100%" height="1">

    Simple as that. I realize you want to keep it standard at all resolutions on all browsers at all different sizes, and a table bgcolor is much less effective in that than using an image. I think you've demonstrated that pretty effectively.
    The width has to be an absolute value, I cannot enter a % width for an image. My Cold Fusion editor will not recognize this. It also puts a white line about 10 pixels down from where the line is attmepting to be placed. Am I doing something wrong here or is there more HTML code that I can use to erase this line.
    KJ


  14. #14
    kervinj Guest

    Post

    Originally posted by kervinj:
    Originally posted by wasson:
    You could use an image without getting in too much trouble with monitor sizes and resolutions. You could use a 1X1 pixel GIF of whatever color you wanted, then define it's settings like this:

    <img src="red.gif" width="100%" height="1">

    Simple as that. I realize you want to keep it standard at all resolutions on all browsers at all different sizes, and a table bgcolor is much less effective in that than using an image. I think you've demonstrated that pretty effectively.
    The width has to be an absolute value, I cannot enter a % width for an image. My Cold Fusion editor will not recognize this. It also puts a white line about 10 pixels down from where the line is attmepting to be placed. Am I doing something wrong here or is there more HTML code that I can use to erase this line.
    KJ

    My Bad!!! It works!!!! You are great. I had my image in an images folder and made the common mistake of not including "images in the path for the folder. Thanks so much for your help. The Cold Fusion editor looked as if the code would not work because the % sign was black instead of the blue it is with active code for attributes. However, it must work afterall. I do thank you for solving this design dilemma for me.
    KJ

  15. #15
    Join Date
    Jun 2001
    Location
    Peoria, IL
    Posts
    521

    Post

    Anytime, pal. Glad it worked for you.

Similar Threads

  1. <h1><h2> on the same line
    By shadiadi in forum HTML / XHTML / XML
    Replies: 1
    Last Post: 11-25-2008, 03:58 PM
  2. Suppressing New Line after <UL> in IE
    By slee552 in forum HTML / XHTML / XML
    Replies: 1
    Last Post: 01-17-2005, 05:10 PM
  3. All I'm asking for is one line
    By undertoad in forum HTML / XHTML / XML
    Replies: 4
    Last Post: 10-24-2003, 01:05 PM
  4. Using Same Line
    By Revelation in forum HTML / XHTML / XML
    Replies: 2
    Last Post: 09-17-2003, 10:16 AM
  5. tables - thin thin internal and external borders
    By fiddefura in forum HTML / XHTML / XML
    Replies: 3
    Last Post: 02-11-2003, 12:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBadvanced CMPS v4.1.1