Results 1 to 15 of 15

Thread: Insert text into border

  1. #1
    Join Date
    May 2014

    Insert text into border

    Hi! I have a question regarding this issue:


    Right now I have created grey border around page, and I need to insert text (w/ link) into upper border field.

    I am using Kompozer and Dreamweaver, and I have tried several times to insert text via Insert -> Form -> Text, but I can't put this form into the border, can anyone help me please?

  2. #2
    Join Date
    Mar 2012
    You cannot put text in a border, but there are various ways that you can put text in what appears to be a border.

    Say you want to have a "border" of 50px around a box, with text in the upper "border", then set up two divs, the upper one with a background matching the body background (or not set). E.g.

    <title>Border Text Demo</title>
    * {
    margin: 0;
    padding: 0;
    border: 0;
    html {
    body {
    width: 100%;
    height: 400px;
    background-color: #999;
    #upper {
    height: 30px;
    padding: 10px 0;
    font-size: 24px;
    text-align: center;
    color: #000;
    background-color: #999;
    clear: both;
    #mainarea {
    height: 280px;
    margin: 0 50px 50px 50px;
    padding: 10px;
    color: #FFF;
    background-color: #F70;
    <div id="upper">
    This text appears to be in the border of the box below...
    <div id="mainarea">
    This is the main text area...

  3. #3
    Join Date
    May 2014
    Thank you, I have managed to apply your code to my html file; however, e-mail client doesn't recognize "background image." Is there a way to make it compatible w/ Outlook etc? Instead of image there is just blank space. Firefox reads it correctly, though. I have read that Outlook doesn't read several CSS options, and background image just seems to be one of them.

  4. #4
    Join Date
    Mar 2012
    I am not familiar with the Outlook client you refer to. HTML elements, by default, generally have a transparent background, so any color or image behind them can show though. If that is not the case with the Outlook client then there is nothing I can suggest to do about it.

  5. #5
    Join Date
    May 2014
    Thanks! I just want to specify that when I copy this code to create HTML e-mail, this part "background-color" simply disappears... I.e., the programme rejects it... I have no idea how to insert background image so that it would be visible.

  6. #6
    Join Date
    Mar 2012
    I have no experience of html emails, so I cannot comment.

  7. #7
    Join Date
    May 2014
    I did it. It is very easy way to insert the text into border.

  8. #8
    Join Date
    May 2014
    Text into border... Yes, well, it turned out that what I needed was text on background image... I substituted background-color w/ background-image and it doesn't work... It is mentioned here that indeed background-image CSS is incompatible w/ Outlook.

  9. #9
    Join Date
    Mar 2012
    Quote Originally Posted by Juliata View Post
    Text into border... Yes, well, it turned out that what I needed was text on background image... I substituted background-color w/ background-image and it doesn't work... It is mentioned here that indeed background-image CSS is incompatible w/ Outlook.
    Or, more accurately, Outlook does not support the background image property! At least you have found the answer, and need not spend any more time trying to get Outlook to display a background image.

  10. #10
    Ah, one little detail buried in the posts -- it's an E-mail.

    Generally speaking, R-mails are VERY different from writing web pages, and that's what's biting you. As a rule of thumb, it's a bad idea to even MAKE styled e-mails as a lot of hosts use it as a spam filter. I know my setups all do because there is no legitimate excuse for someone sending me a legitimate e-mail to send one done with HTML.

    That said, mail clients on the whole choke badly on HTML e-mails because their rendering engines usually haven't been updated since 1996 -- That's NOT a joke. On the whole they support HTML 3.2 BARELY, and CSS support is spotty if nonexistent. AS SUCH, trying to use CSS in a HTML e-mail is NOT GOING TO WORK reliably across all the different mail clients out there.

    AS SUCH, to make a working HTML e-mail you have to dial the clock back to 1997 and write nothing but HTML 3.2 without CSS, and even then you'll want to check at least FIVE mail clients (Three webmail, outlook, thunderbird) to see if it actually works how you want.

    Then of course there's the other thing biting you, your tools. Now I'm not saying that using anything more complex than a flat text editor is a waste of time, and I'm not saying that you can't learn anything from Dreamweaver aside from how not to build a site... No, wait... That's EXACTLY what I'm saying.

    If you REALLY have your heart set on doing this, you should be working from a flat text editor, and I'd suggest using something like Oracle VirtualBox with Windows 98 installed in it to test in Nyetscape 4 and IE 5.0 (NOT 5.5, too new). If you can get it working in both of those WITHOUT using CSS, it will work in an e-mail.

    But again, I wouldn't be wasting my time on that crap in the first place as again, I block them by default as do a lot of other people. HTML in e-mail was a dumb idea at the start, and it's not really viable given that all the mail clients (other than the now defunct Opera 12/earlier) haven't bothered updating their rendering engines in what is rapidly closing on two decades.

  11. #11
    Join Date
    Mar 2011
    If anyone wants more information about CSS support in Email clients, I found a site that has a pretty comprehensive chart that shows what works and where at http://www.campaignmonitor.com/css/. It includes the most popular desktop and mobile clients and claims to have been updated this month. These folks are in the mass Email business, so I'd be inclined to trust their information.

    My reading of it is that you'll find broad support for basic text styling properties, borders, and background colors, and you're best off using inline styles since (apparently) GMail doesn't support embedded stylesheets. Everything else is hit-or-miss.
    Rick Trethewey
    Rainbo Design

  12. #12
    Join Date
    May 2014
    deathshadow, thank you! Indeed, I have consulted a few more resources and found out that it is more efficient to use Notepad++ for creating & editing HTML. I have stumbled upon inconsistency among e-mail clients; if one engine renders style= etc correctly, the other does not. Since it is supposed to be newsletter for existing business clients, it is crucial to create "universal" code that would be rendered correctly by the most popular e-mail clients (including mobile clients since many use only their phones for communication purposes) so as not to scare them away by sending sth that looks totally ugly

    As to the use of Dreamweaver... Isn't "what you get is what you see" the best approach? I mean, I am not by all means a pro in anything related to web design, but for the beginners wouldn't it be more useful to learn from Kompozer etc.? I mean, there are various tips on the net hot to create newsletter, and such programs seem to be on the top of the list.

    rtrethewey Thank you! I have found the following: "Some email clients will ignore a background on the <body> tag, or one that’s set in your style sheet. Having a wrapping table around all your content and setting a bgcolor attribute on it will work around this issue." Alltough bgcolor allows to use only colors, i.e., you can't add link to image file to be used as background, right?... I mean, if using HTML 3.2. is the only option, I have to re-write the whole code b/c there are major differences between HTML 4.0 and 3.2, AFAIK.

    Oh my, I remember Netscape Navigator... *sigh* Good ol' days. Right, if VirtualBox is my time machine to go back to 90s, then so be it. Thanks again! Can't wait for the results... I mean, if my boss assigned this task to ME, and he knows better, then I have to succeed, and I shall

  13. #13
    Join Date
    Mar 2011
    Right. It does look like there are quite a few Email clients that don't support the CSS 'background-image' property. Once you go beyond tables, images, and styled text, you're going to run into compatibility issues. That's not to say its impossible to create an attractive message. You just have to be aware of the limitations and do some testing.
    Rick Trethewey
    Rainbo Design

  14. #14
    Quote Originally Posted by Juliata View Post
    As to the use of Dreamweaver... Isn't "what you get is what you see" the best approach?
    Oddly enough no, because of the nature of what the web is. There's a saying a dearly departed friend of mine came up with: "This is the Internet, the only thing we know for certain is we do not know who will visit a website."

    The simple fact is with the variety of default font sizes, screen sizes, font rendering capabilities -- What YOU see is almost guaranteed NOT to be what the visitor gets. Much less the rendering engines used by most WYSIWYGS don't even render like the real browser they are based on. DW is notorious for this since legacy versions were based on Presto (Opera's engine -- you'd never know it) and newer versions are based on webkit (which again, REALLY?). You can't trust the preview pane, and just because it works in the preview pane doesn't mean you still don't have to test it in at least eight browsers (IE 6, 7, 9, 11, Opera 12.17 and latest, latest FF, Chrome and Safari). Alt-tab F5 is your friend.

    You also have the issue that what WYSIWYG's make for code is non-semantic inaccessible bloated trash. No automated tool seems to (nor do I think they ever can) do things like logical document structure and heading orders. It's why pretty much any site built using a WYSIWYG is absolute rubbish.

    Though at the same time, we all have to start somewhere. Much to my own shame my first site from 17 years ago was built with Nyetscape Composer.

    Honestly, for something like a newsletter -- I'd put it on your website, and send LINKS to it as the mail. Or at the very least, put it on the website as well as sending it, with a plaintext link before it "having trouble viewing this mail?"

    If you do go the HTML mail route, be sure to send both HTML and plaintext in the mail. That's called "multi-part mime" which goes a little something like this:

    $to = 'email@example.com';
    $from = 'another@example.com';
    $subject = 'NewsLetter';
    $divider = uniqid('newsLetter');
    $headers = ';
    $message = '
    This is a MIME encoded message.
    --' . $divider . '
    Content-type: text/plain;charset=utf-8
    Your plaintext version of the e-mail goes here
    --' . $divider . '
    Content-type: text/html;charset=utf-8
    <p>The HTML version goes here</p>
    --' . $boundary;
    mail('', $subject, $message, 'MIME-Version: 1.0
    From: ' . $from . '
    To: ' . $to . '
    Content-Type: multipart/alternative;boundary=' . $divider .
    'X-Mailer: PHP/'.phpversion());

  15. #15
    Oops, gah the lack of edit drives me nuts. Remove the $headers ='; line, left over cruft from my gutting it down.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.11744 seconds
  • Memory Usage 3,009KB
  • Queries Executed 15 (?)
More Information
Template Usage (34):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (15)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (15)postbit
  • (15)postbit_onlinestatus
  • (15)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (72):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates