CSS image?
14 minutes ago, stefanmz said:Well I don't know my homework assignments are weird. "Button images and flag images must be linked through the CSS file." this is what it says. Do you think he means do it completely in CSS or just style it in CSS? I might have misunderstood. I mean if it's so bad I am using the <img> tag anyway I would have never thought doing it the other way myself. So what do you think about my assignment? How do you understand it?
Oh right, if it's a button and you're going to have text in the button as well, that makes a little more sense. I thought you were talking about just inserting an image into the page. You should be fine to just give the button an ID and then use a background-image CSS attribute on that ID, as described above (and you shouldn't need to set the width and height)
Oh, and if you ever need to use the IMG tag in the future, the syntax is pretty simple:
<img src="path/to/image" alt="Short description of the image (for those using screen-readers)" />
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now