473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CSS word long within the div

Defects of the code below:
with Mozilla, Netscape, the word hellooo..... exit outside from the div;
with IE 5,5, 6 the word hellooo.... increase the width of the div, even
if i have fixed to 100px the width;

Question:
can I make so that word hellooooo..... remains all within to the div?
I do not want to use overflow in order to see the text with the sliding bar,
but it must to increase the height of the div, so the div can to contain
all the word hellooo.....
on more rows;
I have tried to put heigth=auto but it does not change null;

<div style='width:200px;background:green;'>

<div style='width:100px; background:#99CCFF;'>

helloooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooo
</div>

<div style='width:100px; background:silver;'>
by by
</div>
</div>
thank you
Jul 20 '05 #1
10 2523
provaands <in**********@tucossa.it> wrote:
Defects of the code below:
with Mozilla, Netscape, the word hellooo..... exit outside from the div;
with IE 5,5, 6 the word hellooo.... increase the width of the div, even
if i have fixed to 100px the width;

Question:
can I make so that word hellooooo..... remains all within to the div?
I do not want to use overflow in order to see the text with the sliding bar,
but it must to increase the height of the div, so the div can to contain
all the word hellooo.....
on more rows;
I have tried to put heigth=auto but it does not change null;

<div style='width:200px;background:green;'>

<div style='width:100px; background:#99CCFF;'>

hellooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooo
</div>

<div style='width:100px; background:silver;'>
by by
</div>
</div>


Why are you using a block level element?
Why do you want to set a width?

An url with a sample of what you are trying to do using real content
would be much more useful.

--
Spartanicus
Jul 20 '05 #2
Spartanicus wrote:
provaands <in**********@tucossa.it> wrote:

Defects of the code below:
with Mozilla, Netscape, the word hellooo..... exit outside from the div;
with IE 5,5, 6 the word hellooo.... increase the width of the div, even
if i have fixed to 100px the width;

Question:
can I make so that word hellooooo..... remains all within to the div?
I do not want to use overflow in order to see the text with the sliding bar,
but it must to increase the height of the div, so the div can to contain
all the word hellooo.....
on more rows;
I have tried to put heigth=auto but it does not change null;

<div style='width:200px;background:green;'>

<div style='width:100px; background:#99CCFF;'>

helloooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooo
</div>

<div style='width:100px; background:silver;'>
by by
</div>
</div>

Why are you using a block level element? Because this is a portion of a layout more complex;
the code inherent only one portion of the layout complete (that isn't
important for resolve the problem) Why do you want to set a width? Becuse the left column of layout is so (colum with width non variable) An url with a sample of what you are trying to do using real content
would be much more useful.

I tested on localhost;
but the question is simple:
if I would like used that code with that text is it possible resolve the
problem ?


Jul 20 '05 #3
provaands <in**********@tucossa.it> wrote:
Why are you using a block level element?
Because this is a portion of a layout more complex;
the code inherent only one portion of the layout complete (that isn't
important for resolve the problem)


You won't let us see the "problem", you think that you've described it,
but all you've done is present a "solution" that doesn't do what you
want it to do.

A proper answer requires real content:
http://www.spartanicus.utvinternet.i...s_help_you.htm

--
Spartanicus
Jul 20 '05 #4
provaands wrote:
[...] increase the width of the div, even
if i have fixed to 100px the width;

"width" sets a minimum width, not an absolute. You could try
"max-width" but it is not broadly supported yet.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 20 '05 #5
jmm-list-gn <jm***************@sohnen-moe.com> wrote:
[...] increase the width of the div, even
if i have fixed to 100px the width;

"width" sets a minimum width, not an absolute.


Incorrect.

--
Spartanicus
Jul 20 '05 #6
jmm-list-gn wrote:
provaands wrote:
[...] increase the width of the div, even
if i have fixed to 100px the width;

"width" sets a minimum width, not an absolute.


Not in CSS.

Internet Explorer has a bug in which it treats width as min-width when
overflow is set to visible.... but that's just a bug in one browser.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 20 '05 #7
provaands / 2004-08-14 23:36:
Question:
can I make so that word hellooooo..... remains all within to the div?
You have
<div style='width:100px; background:#99CCFF;'>
helloooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooo
</div>


You want

<div class="enclose"> hello....ooo </div>

with a style sheet rules

..enclose { min-width: 100px; }
* html .enclose { width: 100px; }

That is, you really want to use 'min-width' property. The latter
line is for MSIE which doesn't support 'min-width'. Fortunately it
implements 'width' incorrectly and it works just like 'min-width' is
supposed to work. In addition, MSIE has a CSS selector bug that
makes it to match "* html .enclose" selector with all elements that
have class "enclose". So only MSIE sees the 'width' rule.

If you care that some browsers do not support min-width and do not
have the same parser bug as MSIE and the page layout is too fragile
to take default of 'auto' for the 'width', then you could try
different rules instead:

..enclose { width: 100px; }
html>body .enclose { width: auto; min-width: 100px; }

This time we *undo* the incorrect 'width' setting with a rule that
has "too complex" selector for MSIE and friends that implement
'width' incorrectly. Hopefully every browser that understands this
selector also implements 'min-width'.

If you want to also support MSIE5 which has broken box model it gets
more complicated; if you have borders, paddings or margins, you have
to subract those from the 'width'...

If you really want to go through all of this and find out about
different browser bugs, here's a great place to start:
http://www.positioniseverything.net/

--
Mikko
Jul 20 '05 #8
On Sat, 14 Aug 2004 22:08:07 +0100, Spartanicus wrote:
provaands <in**********@tucossa.it> wrote:
Defects of the code below:
... An url with a sample of what you are trying to do using real content
would be much more useful.


You mean, like this erudite author proposes?
<http://www.spartanicus.utvinternet.ie/help_us_help_you.htm> *
Why did you not link to it?

* The only concept that it does not seem to address
specifically is that the content be 'real', which
I agree might help here.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 20 '05 #9
Andrew Thompson <Se********@www.invalid> wrote:
An url with a sample of what you are trying to do using real content
would be much more useful.
You mean, like this erudite author proposes?
<http://www.spartanicus.utvinternet.ie/help_us_help_you.htm> *
Why did you not link to it?


Because the lack of real content was the main problem here, although
mentioned in the above document I suspect that most people would miss it
(creating a minimised test case is the main topic of that document).
* The only concept that it does not seem to address
specifically is that the content be 'real'


See, you also missed it :-)

--
Spartanicus
Jul 20 '05 #10
Mikko Rantalainen <mi**@st.jyu.fi> wrote:
Question:
can I make so that word hellooooo..... remains all within to the div?


You have
<div style='width:100px; background:#99CCFF;'>
helloooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooo
</div>


You want

<div class="enclose"> hello....ooo </div>

with a style sheet rules

.enclose { min-width: 100px; }
* html .enclose { width: 100px; }


Incorrect, it doesn't do what the op wants, in fact it doesn't even do
what you want it to do :)

--
Spartanicus
Jul 20 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Chris | last post by:
Hi, - How can I open an existing word document from a C#-client and manipulate that document from within the C#-client ? - How can I open an excel document that is embedded in a word-document...
10
by: John | last post by:
Hi I am trying to do a word mailmerge form within my vb.net app. My problem is how to do a query on one of my tables and use the result as the mail merge datasource. Any help would be...
8
by: Frost | last post by:
Hi All, I am a newbie i have written a c program on unix for line by line comparison for two files now could some one help on how i could do word by word comparison in case both lines have the...
3
by: Bilgehan.Balban | last post by:
Hi, My platform has 32 bit words, and an `unsigned int' corresponds to 32 bits. Also an `unsigned long long' corresponds to 64 bits. If I declare a type of `unsigned long long', can I assume...
5
by: jmar | last post by:
I posted a week ago and received one response. I'm looking for the opinion of several experienced .NET people before I proceed so I'm posting again. Sorry for the repost... I am updating a...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
6
by: Eric Layman | last post by:
Hi, I have fields from textareas. With a click of a button, php is able to grab these fields and by using header(), convert the output to Ms Word doc. But the outcome of the word doc...
209
by: arnuld | last post by:
I searched the c.l.c archives provided by Google as Google Groups with "word input" as the key words and did not come up with anything good. C++ has std::string for taking a word as input from...
3
by: Greg (codepug | last post by:
For the purpose of viewing a document that I would like to modify on rare occassion using word. I would like to create a document with MS Word, and then have my Access Application launch and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.