Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > text over text

Reply
Thread Tools

text over text

 
 
Jeff Thies
Guest
Posts: n/a
 
      07-23-2005
Seemingly simple request:

Positioning either text or an image (the word "SOLD") over a paragraph.

I could set in a background-image, but that wouldn't be on top. I can't
think of a decent way to do this with relative positioning (might as
well use margins).

Any ideas?

Jeff
 
Reply With Quote
 
 
 
 
ppcguy
Guest
Posts: n/a
 
      07-23-2005
you have to use DHTML.

look into layers and absolute positioning.

if you want to make it diagonal - i think you'll have to use
an image.

"Jeff Thies" <> wrote in message
news:czsEe.7938$ nk.net...
> Seemingly simple request:
>
> Positioning either text or an image (the word "SOLD") over a paragraph.
>
> I could set in a background-image, but that wouldn't be on top. I can't
> think of a decent way to do this with relative positioning (might as
> well use margins).
>
> Any ideas?
>
> Jeff



 
Reply With Quote
 
 
 
 
Jeff Thies
Guest
Posts: n/a
 
      07-23-2005
ppcguy wrote:

> you have to use DHTML.


Why?

This is close to what I want:

<div style="font-size: 3em;position: relative;top: 1em;font-weight:
900;font-family: Verdana,sans-serif;color: red;z-index: 1">SOLD</div>
<p style="position: relative;top: -5em;margin-bottom: -5em; width: 200px">
xxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxx
xxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxx
xxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxx
xxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxx
xxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxx
</p>
<p>following paragraph</p>

Jeff
>
> look into layers and absolute positioning.
>
> if you want to make it diagonal - i think you'll have to use
> an image.
>
> "Jeff Thies" <> wrote in message
> news:czsEe.7938$ nk.net...
>
>>Seemingly simple request:
>>
>>Positioning either text or an image (the word "SOLD") over a paragraph.
>>
>>I could set in a background-image, but that wouldn't be on top. I can't
>>think of a decent way to do this with relative positioning (might as
>>well use margins).
>>
>> Any ideas?
>>
>> Jeff

>
>
>

 
Reply With Quote
 
Robert Frost-Bridges
Guest
Posts: n/a
 
      07-23-2005
Jeff Thies wrote:

> Why?
>
> This is close to what I want:
>
> <div style="font-size: 3em;position: relative;top: 1em;font-weight:
> 900;font-family: Verdana,sans-serif;color: red;z-index: 1">SOLD</div>
> <p style="position: relative;top: -5em;margin-bottom: -5em; width: 200px">
> xxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxx
> xxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxx
> xxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxx
> xxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxx
> xxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxxx
> </p>
> <p>following paragraph</p>


I think you're pretty much there with that anyway. It's always going to
shift about with varying font-sizes.

http://www.brightonfixedodds.net/test/overlay.html

--
Robert
http://brightonfixedodds.net

 
Reply With Quote
 
Robert Frost-Bridges
Guest
Posts: n/a
 
      07-23-2005
Robert Frost-Bridges wrote:

> I think you're pretty much there with that anyway. It's always going to
> shift about with varying font-sizes.
>
> http://www.brightonfixedodds.net/test/overlay.html



and browsers.

--
Robert
http://brightonfixedodds.net

 
Reply With Quote
 
Jeff Thies
Guest
Posts: n/a
 
      07-24-2005
Robert Frost-Bridges wrote:
> Robert Frost-Bridges wrote:
>
>
>>I think you're pretty much there with that anyway. It's always going to
>>shift about with varying font-sizes.
>>
>>http://www.brightonfixedodds.net/test/overlay.html

>
>
>
> and browsers.


This looks pretty much the same in NS7.2, IE6 and Opera 7 (windows).
Haven't fired up the Mac yet. Have you noticed anything really off?

My first thought on this was to drop a little script in that would
look for every instance of class "sold" and measure the height of the
following paragraph and adjust accordingly. I'm not sure that is
necessary. I'm a bit concerned with compensating for the whitespace that
the "SOLD" image or text leaves. Note the space before "too late".

Jeff

>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text over Text errors letterman@invalid.com Firefox 18 06-03-2008 08:40 PM
VOIP over VPN over TCP over WAP over 3G Theo Markettos UK VOIP 2 02-14-2008 03:27 PM
RMI only works over network and not over internet zach.bastick@gmail.com Java 7 02-23-2005 10:52 PM
FTP over SSL vs FTP over SSH someone Java 1 04-25-2004 03:30 PM
Web Crystal Report repite the same line over an over in the webserver Cesar Zam ASP .Net 0 11-06-2003 09:30 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57