View Single Post
Old 11-22-2014, 06:46 AM   #3
rosshalde
Zealot
rosshalde began at the beginning.
 
Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
ok, so would each of these be acceptable as a representative of

<XXX><img alt="" src="..." /></XXX>

1) <p class="s1"><img alt="" src="..." /></s1> and define in the css

.s1{
text-align:center
}
2) <div class="image"><img alt="" src="..." /></div>
and define in the css
.image{
text-align:center
}

is there a preference for using a <p> style vs <div> style. Will there ever be a difference on how these are displayed? Even though it is an image, is "text-align:center" the best way to go? I saw someone else doing something like
margin-left:auto
margin-right:auto in the css. Is there anything better or worse about either option? Is there a preferred option?
I really appreciate your help in clearing this up. I am brand new at this and have been going through some tutorials over at W3, but it is helpful to be able to ask questions like these.
rosshalde is offline   Reply With Quote