Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

span, div, layer, style??

Posted on 2001-06-10
8
Medium Priority
?
659 Views
Last Modified: 2012-05-04
Hi,
Css is about span and div right? But wha'ts the use of them?

And layer is used for?

And style is... enhancing html in such way, the links can change color and they aren't underlined.

So what about dhtml?

<STYLE type="text/css">
  A:link,A:active:A:visited { color:blue; text-decoration:none; font-weight:bold }
  A:hover { color:green; text-decoration:none }
</STYLE>
And why does this codework only in Ie, and not NS? Lastly, what's decoration for?
0
Comment
Question by:java_kevin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 200 total points
ID: 6173255
>>>Css is about span and div right? But wha'ts the use of them?

No span and div are widely used for localized styling but they are also used for positioning and to hold just about any kind of content.  CSS is about formatting for presentation.

>>> And layer is used for?

This a non-standard tag used by Netscrap 4.x only it is similar in behaviour to div.

>>>And style is... enhancing html in such way, the links can change color and they aren't underlined.

Changing link colors and removing the underline are minor CSS features.  All the backgrounds, fonts, borders, positioning, visibility, and a lot of spcial effects are part of he attribute set.

>>>So what about dhtml?

While stlying may be used to enhance dhtml effects, they are not that closely related.  Dhtml uses scripting to cause re-rendering dynamically.  Styles may be modified t do that, but they are separate and independent of the scripting.

>>><STYLE type="text/css">
 A:link,A:active:A:visited { color:blue; text-decoration:none; font-weight:bold }
 A:hover { color:green; text-decoration:none }
</STYLE>
And why does this codework only in Ie, and not NS? Lastly, what's decoration for?

Netscrap 4.x has musch less support for CSS than IE.  The selectors like a:hove are not supported by NS which will only allow A as a selector, and ignores everything else.

text-decoration specifies how the link will be presented.  the default is underline, which is the normal way a link is presented.  text-decoration:none remove the underline.

Cd&
0
 
LVL 10

Expert Comment

by:dij8
ID: 6173406
Cd& has pretty much covered it all here.  But just to add a few points.

HTML is placing content on a web page.
CSS is what it will look like (style).
DHTML is "dynamic" HTML. And dynamic here means changing.

To make changes dynamically you need to use scripting.  DHTML is NOT a language.  It is a method or process.  The scripting makes the changes but you can change the HTML (the content) or the style (placing, colour, look et c.) with the right code.

Finding scripting for dynamic effect is all over the web.  Where I started (and still think is an excellent site) is http://www.dynamicdrive.com/

There are not as many CSS sites around the web but there are still a few.  My favourite (and I believe Cd&'s as well) is http://www.blooberry.com/indexdot/css/index.html.  This site explains the syntax and purpose of all current CSS and states which browsers support which properties.

Both of these sites should give you a lot more information than you need for a long time.  Without being too confusing.
0
 
LVL 18

Expert Comment

by:bruno
ID: 6218947
java_kevin,

please come back and update your question.  You recieved a couple good responses to your question.

BRUNO
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:java_kevin
ID: 6221156
Just extending the quesion...

cobol, you are free to refuse this question, i'll still reward u. Or request for more points.

So, for the hovering part, I can include it for IE folks while netscape will not be affected right? And for the deco, i can use other than default and none so long they are recognised, correct?

-- Dhtml uses scripting to cause re-rendering dynamically
what is actaully meant? for text or images? and how does it re-render them?

bruno, I wasn't able to use the computer during the past wks, let alone access my mail.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6221592
No need for more points.  You're asking for clarification.

If you use hover it will be ignored by Netscrap.

text-decoaration values can be:

none (IE3+ and NS4+)
underline (IE3+ and NS4+)
overline(IE4+ only)
line-through (IE3+ and NS4+)
Blink (NS4+)

The re-rendering associated with dhtml are such thing as moveing elements on the page by changeing the style attribute for top and left of modifying a background or changing visibility or changing size.

for example if you have a DIV with an id of "Aa" you could do a dynamic effect on it by putting:

style="display:none" which means it will not display or take up any space on the page when it is loaded.

then a link somewhere else in the page like this:

<a href="JavaScript:;" onClick="document.all['Aa'].style.display="block">click to show</a>

would be used to show the contents of the div the other elements on the page would be moved to make room for it.

That will only work for IE.  Netscrap will only allow very limited effect.

There are a lot of scripts using Dynamic HTML effects at:

www.dynamicdrive.com that you can download and experiment with.

Cd&
0
 
LVL 10

Expert Comment

by:dij8
ID: 6222539
I tried posting stuff for ages yesterday.  Because just after I typed it all up EE crashed and burned.  I at least saved the text so here it is again (and again Cd& has pretty much covered it).

>>>>>>
You are correct about hovering.  Netscape will just ignore it.  No error will be generated.

text-decoration is explained here: http://www.blooberry.com/indexdot/css/properties/text/textdec.htm

Rerendering by DHTML is done using scripting.  And it can control text or images. e.g.
document.imagename.src="differentimage.gif" will change an image on the fly.  Usually used in a mouseover.
document.spanname.className="shoutit" could change the style of taxt within a span.
(these are examples and the syntax is not necessarily exact, I could certainly pass on scripts to do these things if you need them)

The rerendering is done by the browser.  This is why some browsers don't do what you want.  Some things are not supported by some browsers.
0
 

Author Comment

by:java_kevin
ID: 6240200
I just read through a reference material on js.. whihc included css.

i found that it uses classes. class.fancy.p.bla

in the body, it used <p ...>... </p> *hope you get it*
how does the <p> affect the rendering?

Last thing, the book showed tags too. it used tags.ul.bla. So whatever ul it writes, it will use that attribute. Then if i jus want it to apply for all my text written, how do i write?

thanks for explaning :)
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6240575
The p tag represents a paragraph block any attribute applied the the p tag wilbe applied to everything between <p> and </p> and a line feed will be inserted after the </p> because it is a block element.

I don't know what reference material you are reading but it seems to be JavaScript oriented which means it is most likely offering complex solutions for the use of styles.

If you want a particular set of attributes to apply to text in paragraphs just put this in the head of the page:

<style>
   p {color:green;font-family arial}
</style>

that sets the style for te p tag.  Any of the tags can be declared the same way.  You don't need any scripting to use styles.  Dynamic efects may require scripting, but that is true whether or not styles are used.

Cd&
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question