Centered graphic with link? (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


tmckee -> Centered graphic with link? (11/26/2004 0:21:36)

I used this to center a graphic regardless of scree resolution: <style type="text/css">
body {
background-image: url("images/enterl.gif");
background-repeat: no-repeat;
background-position: center center;
}
</style>

Now, I'd like to make the graphic a link to: http://www.thomasmckee.com/index2.html.

How can I do that? The page I'm working on is www.thomasmckee.com.




Kitka -> RE: Centered graphic with link? (11/26/2004 0:31:44)

I don't think it is possible to link a background image. You will need to make it a regular image.

Here is one suggestion for centering it:
http://www.wpdfd.com/editorial/thebox/deadcentre2.html

Good luck




tmckee -> RE: Centered graphic with link? (11/26/2004 0:51:19)

OK. Thank you. Basically, what I'm trying to do is place a graphic in the center of the page (regardless of screen resolution) and make it a link.




Kitka -> RE: Centered graphic with link? (11/26/2004 1:09:41)

Position your graphic by adapting the CSS code method shown in the link I gave you. Then select the graphic with your mouse and link to it the normal way.

If you are using FrontPage click on Insert > Hyperlink from the menu bar and select the page you wish to link to.

A word of caution - unless you have some words near your graphic like "Enter here" (or similar) there are many(!) people who will not think of clicking on the graphic. They'll think that there is nowhere else to go and leave.

Good Luck.




Kitka -> RE: Centered graphic with link? (11/26/2004 1:21:23)


Oh ... and a very big WELCOME to OutFront. [:)]

Sorry, I didn't notice earlier that this is your first post/thread. [:o]

Warm regards




tmckee -> RE: Centered graphic with link? (11/26/2004 1:24:56)

Thank you very much. And with your help, I think I figured it out. I use notepad for most of my 'Non-flash' stuff which tends to make it easier to make errors. I really should use the wysiwyg applications. Thank you for your help.




Kitka -> RE: Centered graphic with link? (11/26/2004 1:53:49)

I tend to hand-code most of my stuff, but FrontPage and wysiwyg can speed things up for little things like linking, or bigger things like search and replace across a whole web site. I spend most of my time in html view though [8|]

Your graphic is looking good and the link works well. Two possible problems though: your graphic is 200x202px but the dimensions of your content div are set at 250x70px. That might snarl up some browsers. Also, "invisible" is not a valid value for the "visibility" property in CSS. See here: http://www.w3schools.com/css/pr_class_visibility.asp

I am not sure why you would want the graphic to be invisible anyway? [>:]




tmckee -> RE: Centered graphic with link? (11/26/2004 1:57:01)

Oops. Thanks.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
3.222656E-02