Add text on the Image

Source: Internet
Author: User

<Ul class = "departmentheadpic">
<Li style = "Background: #68aae1 URL (skin/images2/department.png) No-repeat center top;">
<Div style = "width: 1000px; Height: 230px; margin: 0 auto;">
<Div class = "pictext"> <% = PDMC %> </div>
</Div>
</LI>
</Ul>

 

 

CSS

. Adjust mentheadpic {Height: 230px; width: auto; Background-color: # FFF; padding-top: 2px; padding-bottom: 2px; position: relative ;}
. Departmentheadpicli {Height: 230px; width: auto ;}
. Pictext
{
Position: relative;
Top: 150px;
Left: 220px;
Font-size: 26px;
Font-weight: bold;
Font-family:,;
Color: # FFF;
Letter-Spacing: 2px;
}

Check whether the front Div element has float and the height of the element exceeds its own height, so that the distance between the text in IE compatibility mode and the left side of the text in Google browser is not equal.

Add text on the Image

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.