Jump to content

Text is in wrong place in IE7


Mark H
 Share

Recommended Posts

The problem is that in IE7 the word "Comment" with it's link are moved to the right of the box.

<div id="forum"><img src="images/forum_graphic.png" width="140" height="34" alt="Comment" /><a href="http://www.rabel.org.uk/rabel-forum">Comment</a></div>

#forum {	float: left;	height: auto;	width: 150px;	margin-left: 15px;	color: #600;	text-align: center;	margin-top: 20px;	padding: 10px;	border: medium ridge #600;}

Is the height: auto the problem?

Link to comment
Share on other sites

There's no reason why the text shouldn't be at the right, if the image leaves enough space for the text to fit there. Images are inline: text can go to the left and right of them.You can display the image as a block to make sure the text ges beneath it.

Link to comment
Share on other sites

There's no reason why the text shouldn't be at the right, if the image leaves enough space for the text to fit there. Images are inline: text can go to the left and right of them.You can display the image as a block to make sure the text ges beneath it.
The text I want to be underneath. In IE7 it appears outside of the box and way over to the right.It's fine in up-to-date browsers.Mark.
Link to comment
Share on other sites

Thanks,I added an inline style to the image, display: block, and now it works fine in all the browsers I test in.As an aside, I tested in Opera, and although the thread topic part worked fine, my Share button had disappeared completely. (Fine in the major browsers.) Would you worry about errors in Opera?Mark.P.S. Setting a specific height for the Forum box didn't solve the problem, it was only using display: block that solved it.P.P.S. A quick refreshing look at the CSS tutorial also clarified some stuff for me, I should now be better equipped for some other developments.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...