Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > All Around Tutorials
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 01-09-2002, 06:07 PM
  #1
Jon Hanlon
Super Guru (Moderator)
 
Jon Hanlon's Avatar
 
Join Date: Jul 2001
Location: Sydney, Australia
Posts: 1,842
iTrader: (0)
Jon Hanlon will become famous soon enough
Css

Q. How do I remove the underlining from links?
A. Using a Stylesheet
<style type="text/css">
A:link {text-decoration: none}
A:visited {text-decoration: none}
A:hover {text-decoration: none}
A:active {text-decoration: none}
</style>
__________________
Jon Hanlon

Last edited by scoutt : 12-07-2006 at 10:02 PM.
Jon Hanlon is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 01-10-2002, 05:23 AM
  #2
whkoh
·!¦[· mod ·]¦!·
 
whkoh's Avatar
 
Join Date: Dec 2000
Location: Singapore
Posts: 3,444
iTrader: (0)
whkoh is on a distinguished road
CSS

Q.
How do I make links change on-hover?

A.
<style type="text/css">
a:hover {text-decoration:overline)
</style>

<style type="text/css">
a:hover {text-decoration:underline)
</style>

<style type="text/css">
a:hover {text-decoration:line-through)
</style>

<style type="text/css">
a:hover {text-decoration:none)
</style>
__________________


whkoh is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 01-16-2002, 11:38 AM
  #3
Dr. Web
Super Virtual Guru
 
Dr. Web's Avatar
 
Join Date: Jan 2001
Location: Colorado, USA
Posts: 5,573
iTrader: (0)
Dr. Web is on a distinguished road
CSS Faq


Q. When setting up forms on a page is there anyway, script or otherwise to get rid of the spacing that the form tags make? Or are there any tips or tricks to get around this?

A. use a style declaration.


<form name=form1 action="myActionPage.cfm" method=post style="display: inline;">
__________________
If you know the enemy and know yourself, you need not fear the result of a hundred battles.
If you know yourself but not the enemy, for every victory gained you will also suffer a defeat.
If you know neither the enemy nor yourself, you will succumb in every battle.

-Sun Tzu

Last edited by Dr. Web : 01-16-2002 at 01:13 PM.
Dr. Web is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-04-2002, 06:46 AM
  #4
Goldilocks
Super Deity (Level 18)
 
Goldilocks's Avatar
 
Join Date: Mar 2001
Location: Three Bears Cottage
Posts: 3,578
iTrader: (0)
Goldilocks is on a distinguished road
How do I change the color of the scrollbar?

Place this code in your HTML between the <HEAD> tags:

<style>
<!--BODY {scrollbar-face-color:#000000;
scrollbar-shadow-color:#ffffff;
scrollbar-highlight-color:#000000;
scrollbar-3dlight-color:#993366;
scrollbar-darkshadow-color:#000000;
scrollbar-track-color:#000000;
scrollbar-arrow-color:green;}-->
</style>

Replace the hexidecimal codes with your own choices or just use color names i.e. red, blue, etc.

NOTE: This only works for IE5.1+. It doesn't work in any current version of Netscape.
__________________
Goldilocks is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-31-2002, 12:19 PM
  #5
Dr. Web
Super Virtual Guru
 
Dr. Web's Avatar
 
Join Date: Jan 2001
Location: Colorado, USA
Posts: 5,573
iTrader: (0)
Dr. Web is on a distinguished road
CSS Faq

Q. How do I make different links have different properties? Maybe I want one to be green and highlight red, while the others need to be yellow, and highlight blue.

A. Use CSS classes for your href's. You may create as many classes as you like, and all you need to do is reference them. Here is an example of how to use three different classes on the same page.

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Untitled</title>
<style>
a.swiss:link {color: red; text-decoration: none;}
a.swiss:visited{color: red; text-decoration: none;}
a.swiss:hover {color: yellow; text-decoration: none;}
a.swiss:active{color: red; text-decoration: none;}

a.cheese:link {color: blue; text-decoration: none;}
a.cheese:visited{color: blue; text-decoration: none;}
a.cheese:hover {color: #cccccc; text-decoration: none;}
a.cheese:active{color: blue; text-decoration: none;}

a.wow:link {color: black; text-decoration: underline;}
a.wow:visited{color: black; text-decoration: underline;}
a.wow:hover{color: blue; text-decoration: underline;}
a.wow:active{color: black; text-decoration: underline;}
</STYLE> 


</style>
</head>

<body>

<a href="zonk.html" class="swiss">swiss</a>&nbsp;&nbsp;&nbsp;
<a href="zonk.html" class="cheese">cheese</a>&nbsp;&nbsp;&nbsp;
<a href="zonk.html" class="wow">w o w</A>

</body>
</html>


Last edited by scoutt : 12-07-2006 at 10:01 PM.
Dr. Web is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-22-2002, 11:57 AM
  #6
scoutt
Mister Admin to you
 
scoutt's Avatar
 
Join Date: Jul 2001
Posts: 30,730
iTrader: (0)
scoutt is a jewel in the roughscoutt is a jewel in the roughscoutt is a jewel in the rough
How do I get table headers at top of each printed page?

I remember seeing posts which have asked how to have table headers displayed at the top of each Printed page. Well here's a solution:

Code:
<thead style="display: table-header-group">
<tr>
  <td>Column1 Header</td>
  <td>Column2 Header</td>
</tr>
</thead>
This is IE4+, NS6 compatible
__________________
Have a Script or Snippet you want to share?

WWW Standards: HTML 4.01, CSS2.1, CSS3, XHTML 1.0
PHP Standards: PHP Standards
scoutt is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-04-2005, 03:35 AM
  #7
Pegasus
Extremely Flighty Admin
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 21,465
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
Css Faq

Q: How do I get my pages to go to the edges of the window?

A: Add this to your body CSS style:

{margin: 0px; padding: 0px; }
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-04-2005, 03:36 AM
  #8
Pegasus
Extremely Flighty Admin
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 21,465
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
Q: How do I get rid of the blue border around images that I've made into links?

A: Add this to your CSS style information:

img {border: none; }
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-08-2006, 12:58 AM
  #9
Pegasus
Extremely Flighty Admin
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 21,465
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
Q. I have two <div> sections. I would like them to be on the same line. How do I do this?

A. Add this code to the CSS of the second of the two:

display: inline;
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-17-2006, 10:30 PM
  #10
wrestlenovi
Aspirant (Level 2)
 
wrestlenovi's Avatar
 
Join Date: Jul 2006
Location: Detroit USA
Posts: 12
iTrader: (0)
wrestlenovi is an unknown quantity at this point
Q: How do I add a fixed background image so it stays where it is even when I scroll down the page?

A: Add This inside the head tags of your HTML.
Code:
<style type="text/css">
body 
{
background-image: 
url('image.jpg');
background-attachment: 
fixed
}
</style>
wrestlenovi is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 05-24-2007, 05:49 AM
  #11
welshsteve
Cue Master
 
welshsteve's Avatar
 
Join Date: Oct 2005
Location: Leamington Spa, UK
Posts: 2,443
iTrader: (0)
welshsteve is on a distinguished road
Q: What's the difference between absolute and relative positioning?

A: Setting the positioning as absolute allows you to specify a new positioning context for an element relative to the positioning context of it's parent element. This removes the absolutely positioned element from the normal flow of the document.

Setting the positioning as relative positions the element relative to it's place in the normal document flow.

e.g.

In this example the first div element is positioned 50px from the left and 125px down from the base point (parent). The second div is contained within the first, so its positioning is also determined by the first div element's base point. It therefore occupies the same space. This example creates a new positioning context as the elements are absolutely positioned outside the documents normal flow.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

	<title>Positioning</title>

	<meta http-equiv="Content-Type" content="text/html; charset=shift_jis" />

</head>

<body>

<h1 style="border: 1px solid #000;">Header</h1>
<div style="position: absolute; left: 50px; top: 125px; border: 1px solid #000; width: 200px;">
        <div style="position: absolute; left: 0; top: 0; border: 1px solid #000; width: 198px;">
                This is the text.
        </div>
</div>

</body>

</html>
In this next example, the second div element is positioned relatively. It is placed 120px from the left and 150px from the top of the position it would occupy in the normal flow of the document.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

	<title>Positioning</title>

	<meta http-equiv="Content-Type" content="text/html; charset=shift_jis" />

</head>

<body>

<h1 style="border: 1px solid #000;">Header</h1>
<div style="position: absolute; left: 50px; top: 125px; border: 1px solid #000; width: 200px;">
        This is text for the first.
 </div>
 
 <div style="position: relative; left: 120px; top: 150px; border: 1px solid #000; width: 198px;">
                This is the text for the second.
</div>


</body>

</html>
Try experimenting with the left and top setting of the relatively positioned div.

REMEMBER: it's left and top settings are relative to the elements position in the normal flow of the document. In other words, if you were to change these settings to 0 for both left and top, the second div would then appear after the header element and before the first div. This can occur because the first div is absolutely positioned, and is therefore no longer a part of the normal flow of the document.

These settings allow you to overlap elements on the screen. When two elements overlap, you need to decide which of these takes precedence. In other words, which of the two elements appears "on top" and which appears "behind". This is achieved using the z-index selector.

In this example the second div takes precedence because it's z-index value is higher than that of the first div.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

	<title>Positioning</title>

	<meta http-equiv="Content-Type" content="text/html; charset=shift_jis" />

</head>

<body>

<h1 style="border: 1px solid #000;">Header</h1>
<div style="position: absolute; left: 50px; top: 50px; border: 1px solid #000; width: 200px; background-color: #aff;z-index:1;">
        This is text for the first.
 </div>
 
 <div style="position: relative; left: 0; top: 0; border: 1px solid #000; width: 198px; background-color: #ffa;z-index:2;">
                This is the text for the second.
</div>


</body>

</html>
I hope this makes sense to you It's my first tutorial.
welshsteve is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-10-2007, 06:33 PM
  #12
deadwing
Fighter (Level 4)
 
deadwing's Avatar
 
Join Date: Nov 2007
Location: USA
Posts: 34
iTrader: (0)
deadwing is an unknown quantity at this point
Quote:
Originally Posted by Dr. Web View Post
CSS Faq

Q. How do I make different links have different properties? Maybe I want one to be green and highlight red, while the others need to be yellow, and highlight blue.

A. Use CSS classes for your href's. You may create as many classes as you like, and all you need to do is reference them. Here is an example of how to use three different classes on the same page.

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Untitled</title>
<style>
a.swiss:link {color: red; text-decoration: none;}
a.swiss:visited{color: red; text-decoration: none;}
a.swiss:hover {color: yellow; text-decoration: none;}
a.swiss:active{color: red; text-decoration: none;}

a.cheese:link {color: blue; text-decoration: none;}
a.cheese:visited{color: blue; text-decoration: none;}
a.cheese:hover {color: #cccccc; text-decoration: none;}
a.cheese:active{color: blue; text-decoration: none;}

a.wow:link {color: black; text-decoration: underline;}
a.wow:visited{color: black; text-decoration: underline;}
a.wow:hover{color: blue; text-decoration: underline;}
a.wow:active{color: black; text-decoration: underline;}
</STYLE> 


</style>
</head>

<body>

<a href="zonk.html" class="swiss">swiss</a>&nbsp;&nbsp;&nbsp;
<a href="zonk.html" class="cheese">cheese</a>&nbsp;&nbsp;&nbsp;
<a href="zonk.html" class="wow">w o w</A>

</body>
</html>

I was just getting ready to ask about this when I found the tutorial. Thanks!

Also, is there a way to apply a class to regular text? I was going to use header tags, but as you know, header tags make the text in its own paragraph. I wanted to be able to define my own headers such as this:

H1 {font-size: 8pt; font-family: Verdana; font-weight: bold; color: #A1410E}
H2 {font-size: 10pt; font-family: Verdana}

without having a large space between the header text and regular text. Any ideas on how to remedy this?

Thanks!
deadwing is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 09:45 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.