Cryzabey Posted August 28, 2009 Share Posted August 28, 2009 Page With The Occuring ProblemI'm having troubles getting the margin-top to work with my text. I am attempting to use this property to center the text into the middle of the graph bars. Here is the coding used in one of the bars:<!--- Bar Background ---> <div style='background: url(images/r33.gif); background-repeat: repeat; height: 33px; max-width: 500px;'><!--- Text On Bar ---><font style='color: #000000; font-size: 12px; text-decoration: none; font-style: normal; margin-top: 10px; margin-left; 15px;'>Job One</font></div> <!-- Spacer used as buffer between Bars --><div style='background: url(images/spacer.gif); background-repeat: repeat; height: 5px; max-width: 500px;'></div> Any and all help would be appreciated [: Link to comment Share on other sites More sharing options...
dsonesuk Posted August 28, 2009 Share Posted August 28, 2009 if it is one line of text, set the line-height of text to the same height of the div container line-height: 33px; Link to comment Share on other sites More sharing options...
i_gresn Posted August 28, 2009 Share Posted August 28, 2009 make it a block element, then you can specify a margin e.g. display:block.(I'm pretty sure your text defaults to inline) Link to comment Share on other sites More sharing options...
Cryzabey Posted August 28, 2009 Author Share Posted August 28, 2009 Thanks Dsonesuk!Worked perfectly [: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.