logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > HTML and CSS
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 11-15-2011, 10:41 PM   #1
jim_thomsen
 
Join Date: Nov 2011
Location: On a sailboat, currently in New Zealand
Posts: 6
Default Centering images

I am a beginner and have been using dreamweaver in design mode with one of the templates, but now I am trying to create a new site. I have it set as 3 column fixed. See: www.vanuatutravels.com Once I have the right page setup we will use design view to insert text and pictures.
In the #Main Content section the pictures stay left justified, even when I format for right or center. Currently the code is:
<p align="center"><img src="images/Tanna/DSC_6344.jpg" width="150" height="99" /></p>

In another column, #sidebar 2 it seems the code is the same and the pictures can be centered or right or left.
<p align="center"><img src="images/Tanna/men wear traditional lava lavas at the circumcision ceremony in Lounabeknai, Tanna.jpg" width="350" height="246" /></p>

Looking at the CSS definitions they seem to be the same, with text justified on both. But the sidebar works fine and the main does not. Sorry for what is probably a very beginner question. Obviously I am missing something!
jim_thomsen is offline   Reply With Quote
Old 11-16-2011, 12:02 AM   #2
BullDog
 
Join Date: Nov 2011
Location: Alameda, CA
Posts: 156
Default

I see:

<p><img src="images/Tanna/DSC_6344.jpg" width="150" height="99" /></p>

Change it to:

<p align="center"><img src="images/Tanna/DSC_6344.jpg" width="150" height="99" /></p>
BullDog is offline   Reply With Quote
Old 11-16-2011, 02:41 AM   #3
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

Quote:
<p align="center">
CSS will overrule HTML attributes such as align which is what's happening here. In fact the use of the HTML attribute align is no longer considered good practice.

You'll need to add a CSS class with the text-align:center property and apply that to the paragraphs containing the images you want to center.
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 11-16-2011, 02:46 AM   #4
BullDog
 
Join Date: Nov 2011
Location: Alameda, CA
Posts: 156
Default

thank you. I based that on how he centered the others. feel free to delete my post.
BullDog is offline   Reply With Quote
Old 11-16-2011, 04:07 AM   #5
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

Quote:
Originally Posted by BullDog View Post
thank you. I based that on how he centered the others. feel free to delete my post.
We don't delete posts Bulldog, the more people that want to contribute, the merrier This is a good example of how there can be more than one answer to a problem.
domedia is offline   Reply With Quote
Old 11-16-2011, 07:16 AM   #6
jim_thomsen
 
Join Date: Nov 2011
Location: On a sailboat, currently in New Zealand
Posts: 6
Default

Thank you DWcourse!
I’m sorry, but I am afraid I am a little slow…
You said:


You'll need to add a CSS class with the text-align:center property and apply that to the paragraphs containing the images you want to center.

Here is what I currently have for the CSS for the main content. How can I add something that just applies to the paragraphs containing images?
( Again. I am sorry if these are basic questions I should already understand… my excuse? I’m just an old guy traveling the world by sailboat and trying to learn dreamweaver …I guess I do need a course.)

.thrColFixHdr #mainContent {
width: 450px;
margin-top: 0;
margin-right: 100px;
margin-bottom: 0;
margin-left: 100px;
padding-top: 0;
padding-right: 0px;
padding-bottom: 0;
padding-left: 10px;
background-color: #000;
color: #CCC;
text-align: justify;
border-top-color: #000;
border-right-color: #000;
border-bottom-color: #000;
border-left-color: #000;
left: 20px;
right: 20px;
}
jim_thomsen is offline   Reply With Quote
Old 11-16-2011, 07:40 AM   #7
Corrosive
Corrosive's Avatar
 
Join Date: Feb 2008
Location: Bristol, England
Posts: 7,103
Default

Quote:
Originally Posted by jim_thomsen View Post
my excuse? Iím just an old guy traveling the world by sailboat and trying to learn dreamweaver
Wow, what a way to learn! I am very jealous indeed
Corrosive is offline   Reply With Quote
Old 11-16-2011, 08:00 AM   #8
jim_thomsen
 
Join Date: Nov 2011
Location: On a sailboat, currently in New Zealand
Posts: 6
Default

It's a fun way to learn....but a little slow (that is why I am asking so many questions now.) I just spent 4 months in Vanuatu with no internet connection. But now that I can read the news again...wow, I didn't miss much!
jim_thomsen is offline   Reply With Quote
Old 11-16-2011, 08:26 AM   #9
jim_thomsen
 
Join Date: Nov 2011
Location: On a sailboat, currently in New Zealand
Posts: 6
Default

Yes, a wonderful life. But not easy to learn new programs. I have been in Vanuatu for the past few months without internet access. But then again, I don't think I missed the news that much.
jim_thomsen is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:52 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com