Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text isn't aligning 1

Status
Not open for further replies.

ibobphotos

Programmer
Jun 1, 2008
13
US
Can someone go to and take a look at the bottom where it says IMAGE DETAILS and ADVANCED details?

In FireFox, the text appears to be centered (style2) even though in my CSS file, I told it to left align. The code I used is

Code:
.style2 {
	text-align: left;
	font-family: Geneva, Arial, Helvetica, sans-serif;}

Can someone help me get it to where it should go?
 
Your style2 refers to the span. Span is an inline element, therefore it only surrounds the content (text) inside the span element. And subsequently span cannot have any alignment -- it is always justified.

You would need to put style2 as a class on the paragraph that holds all the advanced details. If you want to keep different fonts for definition and value (which I don't think looks good), then I suggest you use definition list instead of spans inside a paragraph.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Thank you Vragabond. You were right. I stripped out the span tags, instead used p class. And as your opinion regardding the definition and value, now both are the same style2.

Everything appears to be in order now thanks to you. Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top