Jump to content
xisto Community
Sign in to follow this  
jlhaslip

Header < H1> Layout Problem only in IE? FF is okay.

Recommended Posts

The problem is best described as follows. The site in question has a four word Heading as a text field, is contained in a div tag, and I tried using br tags to control the display of the words such that the layout would follow a set pattern. ie: line 1 = 1word, line 2 = next two words, and line 3 = the last word.
It seems like no matter what I do, Internet Explorer displays the words one line at a time, one word on each line. Is this an IE problem? Firefox displays the Heading exactly as I want, but IE doesn't even come close.

<div><h1>WordOne<br />WordTwo WordThree<br />WordFour</h1></div>or<div><h1>WordOne WordTwo<br /> WordThree WordFour</h1></div>or<div><h1>WordOne <br />WordTwo<br /> WordThree WordFour</h1></div>or<div><h1>WordOne WordTwo <br />WordThree <br />WordFour</h1></div>

ALL display in IE5 as you might expect this to be displayed:

<div><h1>WordOne <br />WordTwo <br />WordThree <br />WordFour</h1></div>

Example output regardless of where the br / tags are placed...

WordOne
WordTwo
WordThree
WordFour

And there is lots of vacant space to the right, so it is not the length of the output line which is forcing a lf/cr.

Any suggestions??? (except don't use IE5?) :P

Share this post


Link to post
Share on other sites

haslip here you go this is what you want in your coding

<div width="500" height="500"><h1>WordOne WordTwo WordThree WordFour</h1></div>

mind you you can adjust the height and width to fit the website as needed. :P

Share this post


Link to post
Share on other sites

haslip here you go this is what you want in your coding

<div width="500" height="500"><h1>WordOne WordTwo WordThree WordFour</h1></div>
Did you even read the original question? :P

Share this post


Link to post
Share on other sites

um yes instead of thisWordOneWordTwoWordThreeWordFourhe wanted this WordOne WordTwo WordThree WordFour

Share this post


Link to post
Share on other sites

Nope, I want this:Word1Word2 Word3Word4See now? Force a lf/cr after the first and third word. and IE still won't work to do that.FF behaves absolutely perfect. The br's do what they are told to. IE seems to have a mind of its own...

Share this post


Link to post
Share on other sites

hey haslip i got some good news for you no i didn't save money from gieco but IE5 won't do it try it on IE6 and if not get IE7i did see this happen on IE7Word1Word2 Word3Word4so upgrade your browser to IE6 and see if that works, i think its the fact the IE5 is outdating in coding and what not and won't work for it.

Share this post


Link to post
Share on other sites

Ah Ha!!! Found a way that works, but it is a hack... I really never thught it would make a difference, but placing a non-breaking-space between the words holds them together on one line just like I wanted it to do. Doesn't seem to affect the Firefox, either. So, end of story, thanks for looking at this for me... If you red this and have any other ideas, please post them here. I will watch this topic for a few days.

Share this post


Link to post
Share on other sites

Well, I don't know what you two are doing, but this is what it looks like in IE5.01 for me:

 

Posted Image

 

See: line breaks where they're s'posed to be (and that comes from the code in the very first post in this thread).

That's why I asked to see your page cos there must be something else affecting your display.

Share this post


Link to post
Share on other sites

yeah i used the coding we figure out it was the browser it work on IE7 thats why i missed it the first time, but hes using a mac computer that could be the other problem as well.but he used the <npsb> take to correct it but of course you can do what i figured out put a <br> between the words using the "div tag" info i gave earlier.

Share this post


Link to post
Share on other sites

yeah i used the coding we figure out it was the browser it work on IE7  thats why i missed it the first time, but hes using a mac computer that could be the other problem as well.

Nothing to do with which version of IE or Mac v PC; it was to do with the associated CSS which wasn't posted in this thread (sorted out via PM).

Share this post


Link to post
Share on other sites

maybe you could try this code

<div><h1>WordOne<br />WordTwo WordThree<br />WordFour</h1></div>or<div><h1>WordOne </h1><br /><h1> Word2          Word3</h1><br /><h1>Word4</h1> </div>



may be your write is not correct,
just went to
validaotor of w3c to validate your code.if error,it would give you the details how to adjust it.

guangdian

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.