473,382 Members | 1,357 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,382 software developers and data experts.

Text outside of div visible

Hi!

I want to make a text that goes out of a div under another div visible.
This example illustrates it:

<div style="border-right: 1px solid; width: 9px; background-color:
White; float: left;">
<b>Hello</b>
</div>
<div style="border-right: 1px solid; width: 9px; background-color:
White; float: left;">&nbsp;</div>

I want to see the whole "Hello" including both border lines.

Currently I just see something like: "H| |llo"

Any idea how to achieve that?

Best regards,

Rudi

Apr 17 '07 #1
4 5835
On 2007-04-17, Rudi Hausmann <ru*****@nospam.comwrote:
Hi!

I want to make a text that goes out of a div under another div visible.
This example illustrates it:

<div style="border-right: 1px solid; width: 9px; background-color:
White; float: left;">
<b>Hello</b>
</div>
<div style="border-right: 1px solid; width: 9px; background-color:
White; float: left;">&nbsp;</div>

I want to see the whole "Hello" including both border lines.

Currently I just see something like: "H| |llo"

Any idea how to achieve that?
Change

<b>Hello</b>

to

<b style="position: relative; z-index: 1">Hello</b>
Apr 17 '07 #2
Scripsit Rudi Hausmann:
I want to make a text that goes out of a div under another div
visible.
That's about styling, not HTML. I'm not moving the discussion to
c.i.w.a.stylesheets, though, since it's not clear at all what you really
want.
This example illustrates it:

<div style="border-right: 1px solid; width: 9px; background-color:
White; float: left;">
<b>Hello</b>
</div>
<div style="border-right: 1px solid; width: 9px; background-color:
White; float: left;">&nbsp;</div>
Not really. You are not saying anything about any meaning or content, which
would be HTML related, and you are not describing the desired visual
appearance either. You just give some hints. The code works differently in
Quirks Mode vs. Standards Mode - is that what you want? Which mode do your
pages trigger?
I want to see the whole "Hello" including both border lines.
That's not a very exact description, and it is not consistent with your
actual code. It sounds like you might want the second <divto have
transparent background, as it would have by default - but you're explicitly
setting it to a specific color.
Currently I just see something like: "H| |llo"
Sounds like Standards Mode. In Quirks Mode on IE 7, I see (very roughly
speaking)
"Hello| |". Normally you should author new pages to trigger Standards Mode,
but Quirks Mode gives an idea of what might happen on IE 5, which isn't used
much but isn't quite ignorable either.

In Standards Mode, the appearance naturally depends on the font size. If I
increase the size, different parts of the word "Hello" are masked out, as
expected.

Why don't you describe a real-life use case and illustrate it with a URL?
Preferably as an HTML document that works without CSS, too. Then you can
explain how you would like it to be styled when possible.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Apr 17 '07 #3
Ben C wrote:
On 2007-04-17, Rudi Hausmann <ru*****@nospam.comwrote:
>Hi!

I want to make a text that goes out of a div under another div visible.
This example illustrates it:

<div style="border-right: 1px solid; width: 9px; background-color:
White; float: left;">
<b>Hello</b>
</div>
<div style="border-right: 1px solid; width: 9px; background-color:
White; float: left;">&nbsp;</div>

I want to see the whole "Hello" including both border lines.

Currently I just see something like: "H| |llo"

Any idea how to achieve that?

Change

<b>Hello</b>

to

<b style="position: relative; z-index: 1">Hello</b>
Thanks. That worked exactly as needed.
Apr 18 '07 #4
Jukka K. Korpela wrote:
Scripsit Rudi Hausmann:
>I want to make a text that goes out of a div under another div
visible.

That's about styling, not HTML. I'm not moving the discussion to
c.i.w.a.stylesheets, though, since it's not clear at all what you really
want.
>This example illustrates it:

<div style="border-right: 1px solid; width: 9px; background-color:
White; float: left;">
<b>Hello</b>
</div>
<div style="border-right: 1px solid; width: 9px; background-color:
White; float: left;">&nbsp;</div>

Not really. You are not saying anything about any meaning or content,
which would be HTML related, and you are not describing the desired
visual appearance either. You just give some hints. The code works
differently in Quirks Mode vs. Standards Mode - is that what you want?
Which mode do your pages trigger?
>I want to see the whole "Hello" including both border lines.

That's not a very exact description, and it is not consistent with your
actual code. It sounds like you might want the second <divto have
transparent background, as it would have by default - but you're
explicitly setting it to a specific color.
>Currently I just see something like: "H| |llo"

Sounds like Standards Mode. In Quirks Mode on IE 7, I see (very roughly
speaking)
"Hello| |". Normally you should author new pages to trigger Standards
Mode, but Quirks Mode gives an idea of what might happen on IE 5, which
isn't used much but isn't quite ignorable either.

In Standards Mode, the appearance naturally depends on the font size. If
I increase the size, different parts of the word "Hello" are masked out,
as expected.

Why don't you describe a real-life use case and illustrate it with a
URL? Preferably as an HTML document that works without CSS, too. Then
you can explain how you would like it to be styled when possible.
Thanks for your input! Of course I trigger the Standard Mode. And next
time I gonna put such questions into c.i.w.a.stylesheets.

My use-case (test use case, but not real life use case) was to make a
text which comes out of a div into another div visible. Ben's solution
to change the z-index of the text worked fine. (Your mentioned solution
to leave away the background color would work too.)
Apr 18 '07 #5

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

Similar topics

27
by: C Gillespie | last post by:
Dear All, Hopefully I have a simple problem. Basically, I just want to alter some text with JS. Here is some of my test code: <snip> <script type="text/javascript"> var tmp='a';
4
by: Arif Çimen | last post by:
Hi to everybody, I have chnged a button text in design mode. But After compiling and executing the program the text of the button do not change to new value. Any Ideas? Thaks for helps.
1
by: Antonio | last post by:
Can somebody help me? When a user clicks on the Edit button in a data grid, the record stays in the data grid but text boxes outside the grid are displayed and I would like to have the data from...
2
by: george.leithead | last post by:
Hi all, I have a very strange problem! In following Web page (which is generated from a CMS System), the navigation to the left 'dissapears' when you roll the mouse over the links? It does not...
2
by: Steve Macleod | last post by:
Hi, I am attempting to write a generic class for a warning box. The class looks like this: ..warningBox { background-image:url(images/co_images/warning_flag.gif); background-repeat:no-repeat;...
1
by: rn5a | last post by:
A ASPX page has a DataList control with a few Labels. This page also has a CheckBox which resides OUTSIDE the DataList. By default, this CheckBox is checked. If the CheckBox is checked, then the...
4
by: tbrown | last post by:
I have a listbox on my form and I set it to invisible. When a particular button on the form is pressed, I make the listbox visible and allow the user to select from it. When the selection occurs,...
0
by: sridhar21 | last post by:
hi to all i am having datalist inside updatepanel and a panel(default VISIBLE FALSE) outside updatepanel and i am having linkbutton as item templete in datalist, if i click the linkbutton, ...
26
by: Swifty | last post by:
I'm sending an HTML email to Lotus Notes and I'd like to hide some text from casual observation. There is nothing sinister in this; the text to be hidden is simply a 12-digit number that I use to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

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.