[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

inserting image into Dreamweaver HTML5 div

Posted on 2012-09-13
8
Medium Priority
?
842 Views
Last Modified: 2012-09-13
Help!!!  I had a developer create a page with an HTML5 div, but I can't insert an image using Dreamweaver's design view the way I used to do it.

Please check out www.sharonfarber.com/demo/bio.html

Did they screw up, or is it me?  How do I insert an image and style it with margins and caption tags?

Thanks so much in advance.
0
Comment
Question by:Revolution9
  • 3
  • 3
  • 2
8 Comments
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 38394583
The page looks fine.    Just go to split or code view if you are having problem and insert your image in the same way on the code side.
0
 

Author Comment

by:Revolution9
ID: 38394607
Check out www.sharonfarber.com/demo/bio1.html

I can insert the image in code view, but need you to walk me through on how to style the image (since I can't click on only the image to create a new css rule).  I need to add a right and bottom margin and a caption.

Thanks.
0
 
LVL 2

Expert Comment

by:andreitex
ID: 38394639
I am not a Dreamweaver fan, but I know HTML/CSS.
So in the code of the page you have this:
    <div id="divMain1" class="slickscroll">
    <p>
    Award winning Composer <strong>Sharon Farber</strong>, originally from Israel, has
.
.
.
In addition, Sharon is the Music Director of <strong>Temple of the Arts in Beverly Hills</strong>. </p></div>

if you put a tag like <img src="image.jpg" alt="" /> anywhere in the <div></div> declaration you should be able to see the image (be aware that it must be in the same folder as the HTML file)

And also you should see it in the design section afterwards and modify it however you would like (captions,margins, etc..).
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:Revolution9
ID: 38394707
Even though I have the image placed as you suggested, I still cannot isolate the image in design view in order to style it.  For some reason, when I click on the image, the entire div is selected, with the copy and image, not just the image.  

<div id="divMain1" class="slickscroll">
    <p>
    <img src="images/bio_sfChair.jpg" width="220" height="312" align="left" alt="Sharon Farber">Award winning Composer <strong>Sharon Farber</strong>, originally from Israel, has received critical acclaim as a composer in the Concert world as well as that of Film and TV. She brings to her music influences from her Middle Eastern heritage as well as her extensive knowledge of Classical and Western music.<br/><br/>
0
 
LVL 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 total points
ID: 38394730
One option is to add padding to the right and bottom of the image like below.

   <img src="images/bio_sfChair.jpg" width="220" height="312" align="left" style="padding-right:10px; padding-bottom:5px" alt="Sharon Farber">

Or keep the image with just the hight and width.

<img src="images/bio_sfChair.jpg" width="220" height="312"  alt="Sharon Farber">

Then in your style.css add the following code

p img {
      float: left;
      margin-right: 10px;
      margin-bottom: 10px;
}

Then any time you place an image after the p tag (paragraph), you will get the same padding.  Play with the numbers changing the 10 to see what you like the best.
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 38394742
Try and avoid making changes in the design view other then changing words.  You will be better off in the end working in the code view or split view and directly editing the code.  A little learning curve but you will get better results in the end.
0
 
LVL 2

Expert Comment

by:andreitex
ID: 38394751
ok.. than do it like this:

<div id="photo">
<img src="images/bio_sfChair.jpg" width="220" height="312" align="left" alt="Sharon Farber" />
<div id="caption">Caption text</div>
</div>

in css:
#photo { width: 230px; text-align:center; float:left; }
#caption { width: 230px; float:left; text-align:center; }
0
 

Author Closing Comment

by:Revolution9
ID: 38394814
Padas - you're a freaking genius.  Thanks for the complete and easy to follow answer.  Thank you bro!!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question