Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 02-17-2010, 02:00 PM Unwanted line break
Junior Talker

Posts: 3
Trades: 0
I am creating a webiste where I want one div over an another. This isn't my main page, just an example.
http://oseveno.tk/example.html

In chrome it works great, the text is where it is supposed to be.
In firefox, it adds a linebreak that I don't want.
And in IE... the divs don't want to be over each other.

How can I fix this please?
HTML Code:
<html> 
	<body> 
		<!-- description box --> 
		<div style="width:500px;float:right;border:solid green;position:relative;z-index:2;background:url('tbg.png');border-width:0 0 0 2px;padding:20px;font-family:arial black;"> 
			<p style="color:blue;font-size:25px;"> 
				Header
			</p> 
			<p>Some text that force the user to register:D<br><br><br><br><br><br> 
			<a href="?p=register"><img src='register.png' style="border:0"></a> 
			</p> 
		</div> 
		<br><br><br> 
		<!-- link 1 --> 
		<div style="background:url(link.png) no-repeat;height:53;"> 
			<img src='img/1.png' width='50' height='53' align='left' alt='!'> 
			<span style='font-weight:bold;font-size:25px;white-space:nowrap;'>&nbsp;<span  id="title1">a long header - it is longer then possible:D</span></span><br> 
			<span style='font-weight:bold;font-size:15px;white-space:nowrap;'>&nbsp;<span  id="text1">bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla</span></span> 
		</div> 
		<br> 
		<!-- link 2 --> 
		<div style="background:url(link.png) no-repeat;height:53;"> 
			<img src='img/1.png' width='50' height='53' align='left' alt='!'> 
			<span style='font-weight:bold;font-size:25px;white-space:nowrap;'>&nbsp;<span  id="title2">short header this time.</span></span><br> 
			<span style='font-weight:bold;font-size:15px;white-space:nowrap;'>&nbsp;<span  id="text2">This text does not do a linebreak.</span></span> 
		</div> 
	</body> 
</html>
If the browser is a bit over 1 000 pixels it looks pretty good, but if you resize it it looks bad.

Help please?
Thanks!

Last edited by henke8100; 02-17-2010 at 02:23 PM..
henke8100 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-17-2010, 02:20 PM Re: Unwanted line break
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
A link to "localhost" is of no use whatsoever.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-17-2010, 02:22 PM Re: Unwanted line break
Junior Talker

Posts: 3
Trades: 0
Ohh I am very sorry, I got both a localhost and public adress.
henke8100 is offline
Reply With Quote
View Public Profile
 
Old 02-17-2010, 02:38 PM Re: Unwanted line break
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It's basically doing exactly what you tell it to. You should learn about document structure and block elements, and how the document flow works.

and in CSS "height:53" needs a unit for the dimension, (53 what?)
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-17-2010, 02:45 PM Re: Unwanted line break
Junior Talker

Posts: 3
Trades: 0
Thanks for answering!

I know that I should provide unit(px, cm and so on...), but I was in a bit of hurry when I made this example page.
Updated code, and no bigger changes: the text was just moved a few pixels.

I have been trying to get this to work pretty long now. Thanks for any further help!
henke8100 is offline
Reply With Quote
View Public Profile
 
Old 02-17-2010, 02:49 PM Re: Unwanted line break
ChaibiAlaa's Avatar
Experienced Talker

Posts: 31
Name: Chaibi Mohamed Alaa
Trades: 0
You have to simply make the width static and not dynamic (don't change using users resolution), That way, you get everywhere the same good result, but it might get bad effect on old users using very old screens which are very small.
__________________
CoffeeCupBreak.com |
Please login or register to view this content. Registration is FREE

Blogging-Talk.com |
Please login or register to view this content. Registration is FREE
Community
ChaibiAlaa is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Unwanted line break
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.85788 seconds with 12 queries