Solved

having a problem with <div> tags and z-index with over laying text.

Posted on 2008-10-15
3
243 Views
Last Modified: 2012-05-05
hello,
i have created a banner with <div> tags and z-index with overlying text layer.  it shows up correct in firefox but in ie the text breaks lines after each word. does anyone see an issue with my code?
thanks
<!--BACKGROUND COLOR-->
<div style="width:369px; height:150px; z-index:1; position:absolute;"><a href="/catalog/theme.jsp?themeId=381&"><img src="10-15-08_christmas_store_feature_2.jpg" alt=" Shop 2008 Collectibles" width="369" height="150" border="0"></a></div>
<!--BACKGROUND COLOR-->
 
<!--COPY-->
<div style="width:199px; height:95px; padding-left:20px; padding-right:150px; padding-top:55px; z-index:2; font:Arial, Helvetica, sans-serif; font-size:14px; color:#FFFFFF; position:absolute;">
shop 2008 collectible items
</div>
<!--COPY-->

Open in new window

0
Comment
Question by:nooch44
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22725942
try using in CSS -- display:inline;    or display:inline-block;   to style the text giving problems.
0
 
LVL 4

Accepted Solution

by:
MattKenefick earned 500 total points
ID: 22731770
in IE.. padding subtracts from the total width of an object as opposed to adding to it.

So when you have and object that is about 200px wide.. and you have 20px padding on left, and 150px padding on right... That only leaves 30px of space for words.. Which is why your words are breaking.
0
 

Author Closing Comment

by:nooch44
ID: 31506489
took the padding on the righ away and it did the trick...thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question