Forum Moderators: not2easy

Message Too Old, No Replies

overlaping images with text

none

         

error of time

8:19 am on Oct 1, 2003 (gmt 0)

10+ Year Member



ages and ages ago i was looking arcoss the internet for some nice css code, i found it, but i also found code for overlaping images with text I.E. you have one button it is blank and u use it many times by using css to write over the image. ok so now i come to a stage where i need to use this code but i cant find it anywhere i know it exsists because i see it in action at places like http://www.astalavista.com you can see that the bars are just text overwriten on images

please help soon, thank you

[edited by: Nick_W at 8:25 am (utc) on Oct. 1, 2003]
[edit reason] fixed url [/edit]

mirthe_v

10:00 am on Oct 1, 2003 (gmt 0)

10+ Year Member



Do you mean a div with a background-image?

Like so:

.backimg
{background-image : url(image.gif);
background-repeat : no-repeat;
background-position : top left;}

<div class="backimg">text</div>

error of time

10:57 am on Oct 1, 2003 (gmt 0)

10+ Year Member



no like when you have an image in the forground and you use css to place text overtop of it this meaqns taht there are less images to load if you are using a navbar

Birdman

11:52 am on Oct 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello,

mirthe_v is correct, you want to set the blank button image as the background.

a,a:visited
{
background: url(image.gif) no-repeat;
}

You will undoubtedly have to mess with margin, padding, etc. to get the text aligned properly.

Birdman

Shadows Papa

12:37 pm on Oct 1, 2003 (gmt 0)

10+ Year Member



I also ran across such a site - actually, I've seen several that do that lately. The one stated it was much easier to align things in all browsers using a table - you set the button as the background image of the cell, then simply type the text in the table cell.
It's a piece of cake that way.
If you wanted the same thing to appear on multiple pages, but change it in only one place, use ASP or PHP then you only need a single "include" statement on the page. Keep the info in a single text file.
Guess where I found this info - and saw it in action - on a site that was a CSS tutorial site!
They also said that CSS was great, but there are some things easiest done in tables still, since he considered his nav bar to be a list, or data. They did use a style sheet to format the table - margins, padding, borders, etc.
I think I saved the URL - if not I bet I saved the search that led me to those pages. There were several that did it that way.

Shadows Papa