tags:

views:

124

answers:

2

Here is my task first and foremost:

At the top of the page body, insert a div element with the id "header" containing the inline image "mlogo.jpg". The aternate text for the image should be "Mayer Photography". Insert an inline style that sets the border width of the image to 0 pixels.

So that's my task and here is what I have come up with:

<body>
  <div style="id=header width: 0px"><img src="mlogo.jpg" alt="Mayer Photography">  
  </div>
</body>

I don't know if I'm entering the style attribute correctly to set the width. That's my biggest dilemma I think. And also I'm not sure but I'm thinking the div element should be written like this instead:

<div id="header"><img src="mlogo.jpg alt="Mayer Photography">
   <style="width: 0px"> 
</div>

If you could help me out that'd be awesome! Thanks.

+4  A: 
<div id="header">
  <img style="border:none;" src="mlogo.jpg" alt="Mayer Photography" />
</div>

An inline style is done as an attribute within the tag you're trying to style. You want the image to have no border, that's why you apply the style there. A zero width border is no border. So simplify by saying "border:none;".

msmithgu
Thanks msmithgu. This makes sense.
Ashley
A: 

I think I have this question figured out now. Thanks for your help everyone. :)

Ashley
On Stack Overflow, you should mark someone's (msmithgu) answer as correct by clicking the checkbox next to his answer. No need to edit the title of your question saying it was answered.
philfreo
And no need to 'answer your own question' with a comment like this, you can just edit your question text or comment on the question itself directly.
thenduks