This is a discussion on "new to css: what's the best way to insert image using the external style sheet?" within the Web Page Design section. This forum, and the thread "new to css: what's the best way to insert image using the external style sheet? are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
new to css: what's the best way to insert image using the external style sheet?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
new to css: what's the best way to insert image using the external style sheet?
I tried searching, but got too many vague threads.
I just want to put a logo in the contentheader, that way i can have the logo exactly the same on every html page that i link the css to. what's the best way to do this? sorry for the noobness, im just a little frustrated. |
|
|
|
#2
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
Don't be sorry.
Insert your image into the html. That's where you stuff goes. Css is just to make it pretty and do what you want. So an example would be.
|
|
#3
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
If its a logo then its presentational not content so should go in the css.
I'd use css image replacement for this:
You could, of course, use includes to insert common elements to multiple pages. Pete. |
|
#4
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
I certainly could be wrong about this but when I put my site in the critique forum I was told to place my header/logo in the html so it could be clicked on as it's expected to be a link back to the homepage.
???????????? Yes ??? NO??? |
|
#5
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
This is a link. I'm just removing the link text, setting it to display block (so the whole thing is clickable) along with some dimensions, and popping in a bg image. Its how I do all of my headers. This way you've got the company/site text as real text (and a link).
I'll post up an example in a sec. Pete. |
|
#6
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
|
|
#7
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
Very nice... I must be having a brain cramp. Thanks for uncramping it!
|
|
#8
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
Thanks for the question and answer. I have been doing it that hard way....see what happens when you try to convert a tables site.....
Last Blog Entry: More Sara Blogging (Nov 29th, 2007)
|
|
#9
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
Although, when you make your header or logo a background image you can kiss the alt tag good buy. I prefer to keep that descriptive tag letting a possible screen reader know where they are and what the site is about.
__________________
Web Design and Development |
|
#10
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
You have real text, you don't need an alt tag. It's all there in the markup, all you are doing is embellishing the site name with an image. Separation remember.
Pete. |
|
#11
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
I disagree. Your text is contained in the logo, therefore not readable by screen readers. CSS is for presentaion such as colors, display styles, size, etc. CSS should be used to "style" your content. Ofcourse a person could use their images as background images I would just not suggest it for logo's/header's. Here the source code for the example you had, I see no text besides the link.
__________________
Web Design and Development |
|
#12
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
okay, well for a noob like me, you suggest i just stick with the html for logos?
|
|
#13
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
ScottR here is the text in red
Not directly over the wording, but at the bottom or top margin? If so, you'd want your logo or header to be the background image. So in that instance you'll want it in the css (the way Pete suggested). If you do not plan to have anything else over the top or in the same div as the header, than personally I don't think it makes a big difference which way you do it. Try both and see which one you like. Both are pretty easy... so take your choice. |
|
#14
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
Quote:
i did the html version and it all looks fine in my browser. i just was thinking it would be easy to add the external css with a logo already in it, but i will just do it html for now. |
|
#15
|
|||
|
|||
|
Re: new to css: what's the best way to insert image using the external style sheet?
I'd suggest putting the logo/header image in the css. Am image that exists to improve the way something looks is presentational and does not belong in the HTML. It is bad practice to put it there. Real paragraph is always preferable to alt descriptions from an accessibility standpoint. The image is not necessary for someone to understand what your site is about therefore the graphic is merely a presentational embellishment.
An image in an image gallery or an image that relates to the article or story is content (and is part of the reason that page exists at all) so should be in the HTML. Text is more accessible than anything in almost all cases. Pete. |
![]() |
| Tags |
| external, image |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding a style sheet to an RSS feed problem | Andrew1986 | Other Programming Languages | 5 | Feb 19th, 2008 10:31 |
| Why Style sheet isnt working | kaz | Web Page Design | 19 | Dec 21st, 2007 01:10 |
| CSS Print Style Sheet Problem | bennyboy7 | Web Page Design | 1 | Aug 14th, 2007 08:58 |
| How to tell IE7 to use a pariticular style in a single style sheet | figo2476 | Web Page Design | 5 | May 25th, 2007 14:23 |
| Linking to an external style sheet | ahm531 | Web Page Design | 6 | Aug 31st, 2006 13:23 |