472,980 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,980 software developers and data experts.

HOW TO: place text on top of a line....

Mel
i want to have a thin horizontal line of width 400px with a text placed on
it with background white and the line should go through the middle of my
text vertically, similar to the top of a group box

something like:

----My Text Goes Here----------------------
thanks

Jul 21 '05 #1
10 6490
"Mel" <me**********@hp.com> wrote:
i want to have a thin horizontal line of width 400px with a text placed on
it with background white and the line should go through the middle of my
text vertically, similar to the top of a group box

something like:

----My Text Goes Here----------------------


http://homepage.ntlworld.com/spartanicus/mel.htm

--
Spartanicus
Jul 21 '05 #2
Mel
But that means that i have no control over the color of the line :-(

i need to specify a single color to be used for "line" & "text"

sorry if i was not clear

please help

PS:- i dont have strip.png file either

"Spartanicus" <me@privacy.net> wrote in message
news:t8********************************@news.spart anicus.utvinternet.ie...
"Mel" <me**********@hp.com> wrote:
i want to have a thin horizontal line of width 400px with a text placed onit with background white and the line should go through the middle of my
text vertically, similar to the top of a group box

something like:

----My Text Goes Here----------------------


http://homepage.ntlworld.com/spartanicus/mel.htm

--
Spartanicus

Jul 21 '05 #3
"Mel" <me**********@hp.com> wrote:
"Spartanicus" <me@privacy.net> wrote in message
news:t8********************************@news.spar tanicus.utvinternet.ie...
"Mel" <me**********@hp.com> wrote:
>i want to have a thin horizontal line of width 400px with a text placed
>on it with background white and the line should go through the middle of
>my text vertically, similar to the top of a group box
>
>something like:
>
>----My Text Goes Here----------------------
http://homepage.ntlworld.com/spartanicus/mel.htm

But that means that i have no control over the color of the line :-(


Are you changing the colour of your text frequently?
i need to specify a single color to be used for "line" & "text"
Then make a line graphic in the appropriate colour.
PS:- i dont have strip.png file either


Make one.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #4
>
PS:- i dont have strip.png file either

Make one.

Steve


Better yet, make a blank 1x1 pixel transparent gif and specify the
background color, width and height with css :)

That way you can use the same image for different colors and rectangular
shapes.
Jul 21 '05 #5
Ståle Sæbøe <ot*****@tdz.no> wrote:
Steve Pugh <st***@pugh.net> wrote:
"Mel" <me**********@hp.com> wrote:
PS:- i dont have strip.png file either


Make one.

Better yet, make a blank 1x1 pixel transparent gif and specify the
background color, width and height with css :)


I take it you didn't actally look at the sample code?

To do it your way would involve using more complex code as instead of
a simple background image you would need to use positioning to place
the text on top of the single pixel high div - and in fact you then
wouldn't need the image at all.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #6
Mel wrote:
i want
something like:

----My Text Goes Here----------------------


HTML
<div><h1><span>My Text Goes Here</span></h1></div>

CSS
div {
padding-top: 1em;
background: #fff;
color: #000; }
h1 {
border-top: thin solid #999;
padding-left: 10%;
margin: .5em .2em 0 .2em; }
span {
background: #fff;
color: #000;
padding: 0 1%;
position: relative;
top: -.6em; }

This looks like one of the few cases where relative positioning actually
comes in handy. :) I only tested it in a handful of browsers, so no
guarantees.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #7
"Mel" <me**********@hp.com> wrote:
PS:- i dont have strip.png file either


I wouldn't recommend that you do one, but if you insist then I'd suggest
that jpeg is a more appropriate format ;-)

--
Spartanicus
Jul 21 '05 #8
Spartanicus wrote:
"Mel" <me**********@hp.com> wrote:
PS:- i dont have strip.png file either


jpeg is a more appropriate format ;-)


Not sure what the smiley is for, but jpg is not more appropriate for
line drawings, for sure. A plain stripe should be png all the way.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #9
kchayka <us****@c-net.us> wrote:
PS:- i dont have strip.png file either


I wouldn't recommend that you do one, but if you insist then I'd suggest
that jpeg is a more appropriate format ;-)


Not sure what the smiley is for


http://www.geocities.com/ystradband/bigspender.html

--
Spartanicus
Jul 21 '05 #10
kchayka wrote:
Spartanicus wrote:
"Mel" <me**********@hp.com> wrote:

PS:- i dont have strip.png file either


jpeg is a more appropriate format ;-)

Not sure what the smiley is for, but jpg is not more appropriate for
line drawings, for sure. A plain stripe should be png all the way.


jpeg delivers better overall quality and should be used with a fancy
line with shadows and lightning effects. However, be aware that jpegs
are not transparent and may thus clash with any background colors of the
document (or background images if used as an inline image).

png and gif delivers transparency (thus compatibility with whatever lies
beneath it) but at the cost of "prettyness".

Who is to say what is "appropriate"?
Jul 21 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Peter Brown | last post by:
Hello, The problem I am having is this: I would like an array to have three fields (item_id, item_unit, item_qty) - this I can do from prior postings. Now the Order entry form is...
14
by: Viken Karaguesian | last post by:
Hello all, It stinks being a newbie! One thing that I'm not sure about with CSS is: where is the "proper" place to put font attibutes? This has me a little confused. Take the below style sheet...
1
by: Sabine Oebbecke | last post by:
Hi there, Need some help again ... I have a continuous form which shows the attendees of a competition as per their placing in the competition. So, the first record is the winner, the second...
4
by: Phil Diwell | last post by:
Hi all. I am trying to place text over a picturebox. I thought I coul do this by making the textbox.backcolor property = color.transparent. However this doesn't work (textbox doesn't support...
14
by: Joe | last post by:
Hello All: I am trying to dynamically populate a web page with literal content and controls (textboxes and checkboxes (and eventually two buttons - the buttons do not appear in the code yet). I...
1
by: laredotornado | last post by:
Hello, I have a text file. I would like to write a line of data as the first line and then another as the last line. What is the easiest way to do this using php 4? Thanks, - Dave
6
by: napatel04 | last post by:
Hi everyone, I would like to know if there is a quick query someone can help me write for the following scenario. I think I can do this with VBA but since this is suppose to be a temp. solution,...
1
by: garek007 | last post by:
I'm wondering if there is such a way, without using javascript, to place a piece of text like a token, or identifier, that will get it's value from an outside source, such as a text file. So if I...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.