SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
Thread: header logo as a link
-
Oct 6, 2003, 22:00 #1
- Join Date
- Mar 2003
- Location
- Melbourne, Australia
- Posts
- 463
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
header logo as a link
hi all
i'm trying to work this out
i'm using a style with a background image for my header logo
the problem is that obviously it is better to have the header pic in a style
rather than putting the img tag into the page
but how can i put a link in that area to link to the defalt page of the site
which to me, is definitely a must
without using ridiculous code, is it possible to do this
xhtml 1.1, css2 please
thanks
-
Oct 6, 2003, 22:26 #2
- Join Date
- Dec 2002
- Location
- Denver, CO
- Posts
- 2,877
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
you could just put a transparent .GIF file in the area you want the link....im sure there is probably some better way to do it...but thats my suggestion...
-
Oct 6, 2003, 23:07 #3
- Join Date
- Mar 2003
- Location
- Melbourne, Australia
- Posts
- 463
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
that would work i guess
but i might as well put the actual image there instead then
-
Oct 7, 2003, 06:26 #4
- Join Date
- Apr 2001
- Location
- Sarnia, Ontario, Canada
- Posts
- 434
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by dtra
Put the <a><img /></a> tags in your <h1> tag (if you're using one).
Or put an <a> tag in the <h1> tag and then style the <a> to have the background image.Love it? Hate it? Helpful? Useless?
Use the rate button to let me know what you think of my post!
-
Oct 7, 2003, 09:42 #5
- Join Date
- Jul 2002
- Location
- Ottawa, Canada
- Posts
- 1,766
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The purpose of CSS is to remove styling from your markup.
But the purpose of your header logo is not ONLY for visual styling, but to provide a heading for the page. It makes semantic sense to have your page title/logo at the top of your page, so do so! Use the <img> element.
Just remember to include an appropriate alt attribute for the logo.
-
Oct 7, 2003, 10:16 #6
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Colin is spot on.
But just to show off:
Code:a { border: 1px solid red; display: block; position: absolute; top: 50px; left: 100px; width: 100px; height: 100px; }
HTML Code:<a href="#">Text</a>
DouglasHello World
-
Oct 7, 2003, 16:56 #7
- Join Date
- Mar 2003
- Location
- Melbourne, Australia
- Posts
- 463
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ok cool thanks guys
i'll use the img tag, and it'll also show the complete pic
in ie as well now, also i can put in a bg spacer pic too
Bookmarks