The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Inexplicable Phenomenon, Webpage not following instructions from CSS file
prof611
post Aug 18 2020, 01:39 PM
Post #1





Group: Members
Posts: 3
Joined: 18-August 20
Member No.: 27,503



On one of my websites, http://www.professorscodingcorner.com , I have an inexplicable phenomenon taking place. It is happening on many pages, but I am going to use one of them as an example for the purposes of this conversation: http://www.professorscodingcorner.com/snip.../linkhits.shtml . You can view this page, and its source code, in order to see what I am going to describe as best I can.

There is a link near the bottom of the page, "Get the code". When this link is clicked, an Overlay Box is presented to the viewer, which contains the code for the script under discussion, enterlink.cgi . This box is indeed presented, BUT it does NOT have any styling. According to style2.css , it should have a background-color and a border color. This is the bug that I can't understand.

There is an easy hack that will show the styling: I can add it inline in <div class="box"...> . But I need to find the CAUSE of this bug, since I believe that will help me to solve other bugs that are on my webpages.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 18 2020, 02:25 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



I don't find where you have specified a border, but the background color is overridden by the inline style where you set the background to white.

CODE
<textarea readonly="" id="area" rows="30" cols="150" style="width:480px; height:450px; margin-bottom:20px; background:#FFF;">
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
prof611
post Aug 18 2020, 03:08 PM
Post #3





Group: Members
Posts: 3
Joined: 18-August 20
Member No.: 27,503



Hello pandy -

Thank you for your prompt reply.

style2.css specified:

.box, #newbox {
padding:20px;
border:4px solid #0CC !important;
background-color:#CFF;
}

This assigns a border and background-color for <div class="box"...>

The CODE you cited sets the background color of <textarea...> to white, NOT the box background color.

See the screenshot, which shows what the box SHOULD look like IF it were following the instructions given in style2.css .

Professor


Attached thumbnail(s)
Attached Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 18 2020, 03:25 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Ok. That rule is never read. Nothing after the parse error the validator points out is.

https://jigsaw.w3.org/css-validator/validat...ng=&lang=en
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
prof611
post Aug 19 2020, 01:22 AM
Post #5





Group: Members
Posts: 3
Joined: 18-August 20
Member No.: 27,503



Thank you for introducing me to the validator. But there was no need to be "smug" about it. You could have just said, "There is a missing end-curly-bracket at the end of the attributes for #internalbanner."

I NEVER would have noticed that on my own.

Professor
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 19 2020, 04:12 AM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Sorry. It wasn't my intention to be smug, but that you should learn something. It seems you did. wink.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 12:27 PM