Jump to content

Background disapears


otuatail

Recommended Posts

Hi I have created a site with the background referenced in the style sheet. so that it can easly changed. Problem I found is if I hi-light some text (IN IE 6) on the page the background behind the memory vanishes. Is their a better way to do this. Try hi-lighting the text on this page to see.

 

Desmond.

 

Link to comment
Share on other sites

First, you have an extra div tag at the end of your markup.

 

Next, you have a bunch of blank divs and with the exception of .navigation, the one div your do have text in is not using any semantic block level tag (paragraph, header, list, etc.)

 

A "DIV" is just a placeholder in html - it is NOT a place to just dump text into. It does not take the place of paragraphs, lists, headers, rather it is the container to hold them in the position you want.

 

If you don't use proper markup block level html tags, then you can't be certain how your layout will look from browser to browser.

 

Your issue is of the background disappearing when you "highlight" the text is irrelevant because people in general don't go around highlighting blocks of text, and if they do, then they don't care about what happens to the background.

 

Also, using "position:absolute" is a poor way to lay out a web page. Use floats instead.

 

Here's a good link for you. It will teach you not only about floats, but about lists and the rules of selects http://css.maxdesign.com.au/floatutorial/index.htm.

 

 

Link to comment
Share on other sites

Their are blank dives on the page and that is not an issue. If I go to other websites and do the same thing, nothing happens to the background WHY. I need to find out why this happens not that it does not matter because people would not do it. I need a solution not an excuse.

 

Desmond.

 

Link to comment
Share on other sites

1) A closing div tag that has no opening div tag can indeed cause unexpected errors, sometimes like the one you are speaking of. Errors in your code causes unpredictable reactions. So fix that random closing tag like dbrimlow said, and see if that solves your problem.

2) I just checked your page, and the problem isn't happening for me (win xp/firefox 2)

3) You come on a free forum and ask for help, you get it, and then you:

a) don't even fix the problem that was brought up, which could indeed be causing your problem

b) are rude to the person who was helping you for free

c) don't even say thank you

 

 

Link to comment
Share on other sites

The reason it happens is because whenever you "highlight" text, "HIGHLIGHTING" is exactly what it does; it highlights the text by reversing the background and foreground colors.

 

THIS IS NORMAL BEHAVIOR AND DOES NOT REQUIRE ANY "SOLUTION".

 

You can actually cause a similar effect in FF by highlighting your nav text starting from the top  non-link word - "Lowther" - down to the last word "party bookings".

 

Since we are dealing with FF vs. IE, you now see how each handles text blocks differently (which is why it IS crucial to declare the "logical block level" html tags to control  text - such as paragraphs, lists, headers).

 

I need a solution not an excuse

 

Well, as this is normal behavior, I'm afraid there is no "solution".

 

When it comes to crafting web pages, the first solution to debugging a problem is to check if the markup code is properly written, uses valid html and has no typos or un-closed non-optional elements or selects (in the case of html 4.01).

 

The second solution is to check the syntax of the css.

 

If all of these are properly constructed, then the issue is not the code but the coder ... by this I mean the code is doing exactly what the coder is telling it to do, however unintentional the results.

 

Excuses are therefore the author's responsibility. Learn the basics of web page construction. There are enough issues that need to be dealt with at all levels of proficiency to go around than to worry about things that are NOT an issue..

 

 

Link to comment
Share on other sites

I do not set out yo be rude but I have had numourase occasions where some on the group takes pride in telling me how crap the code is even though it is not part of the problem, and the solution is over looked. I have tried to replicate this in FF. There is no way (as dbrimlow states) I can get the side menu background to turn white. I am not sugesting for a minute that hi-lighted text should not invert colour. But the brown side image should not turn white. I do not find this in FF at all. Only IE. I have removed the solitary </div> and this as expected did not fix the problem.

 

The fact that there are countless websites out there that do not have this problem (www.yorkbaptist.org as one case) where the background does not turn white only the text on the page is affcted, shows that the probblem is elsewhere. I will have to seek advice somewhere.

Link to comment
Share on other sites

[quote]but I have had numourase occasions where some on the group takes pride in telling me how crap the code is even though it is not part of the problem[/quote]

No one takes "pride" in telling another person they have bad code. When helping others we help ourselves because we see things wrong that we either may have done ourselves and fixed, or we see something that we haven't come across before.

When we see someone who has multiple mistakes, we tell them so they will fix it because bad code can be the root of 99% of the problems (and THEN we will be able to HELP).
[code]
.lastupdated
{ 	text-align:right;
	font-family:times new roman;
font-size: em;
font-weight: bold;
font-style:italic;
z-index:1; }

/* Side Menu Tabs */
.navigation
{ 	position:absolute;
left:0em;
top:15em;
width:5em;
background-image: url(../images/screen2.gif);
padding-top:1em;
text-decoration: none;
}

 

Remember I said search for typos? There is no value: "font-size: em;".

 

Remove the "width:5em;" width from navigation and see if it still does it.

 

You're still failing to see the forest for the trees. You are focusing in on an issue that is inconsequential while ignoring the issues that are.

 

But. Sometimes there is just no helping people. This is NOT about ego. So don't get yours hurt and defensive when people point out your errors in code.

 

I've been doing this for 12 years and:  a.) still make mistakes and typos, b.) learn something new every day, c.) cringe whenever I look at code I wrote just 2 years ago.[/code]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.