navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

CSS Alignment For Links

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> CSS Alignment For Links
Page: [1]
 
BobbyDouglas

 

Posts: 5470
Joined: 5/15/2003
From: Arizona
Status: offline

 
CSS Alignment For Links - 7/10/2004 15:33:46   
How would I specify the text to align on the top of the box that surrounds the link?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<style type="text/css">
<!--
div#nav { text-align:left;vertical-align:top;}
div#nav a:link, div#nav a:visited, div#nav a:active {
  text-decoration:none;
  padding-left: 6px;
  padding-right: 6px;
  padding-bottom: 2px;
  padding-top: 15px;
  color: #FBFCFD;
  background-color: #738FBF;
  border: solid 1px #D1D1E1;
	}
div#nav a:hover {
  text-decoration:none;
  padding-left: 6px;
  padding-right: 6px;
  padding-bottom: 2px;
  padding-top: 15px;
  color: #0B198C; 
  border: solid 1px #6983B3;
  background-color: #FBFCFD;
	}
-->
</style>
</head>

<body>
<div id="nav">
	<a href="#">User Editing</a> | 
	<a href="#">Dealer Editing</a> | 
	<a href="#">Registration Editing</a> | 
	<a href="#">Vehicle Editing</a> | 
	<a href="#">Admin Editing</a> | 
	<a href="#">Updates Editing</a>
</div>
</body>
</html>


_____________________________

Arizona Web Design - Mr Bobs Web Design in Arizona
The Arizona Web Hosting Challenge
BobbyDouglas

 

Posts: 5470
Joined: 5/15/2003
From: Arizona
Status: offline

 
RE: CSS Alignment For Links - 7/10/2004 18:52:18   
Only way I got it to work was switched the padding-top with the padding-bottom, but it would still be nice to know how to make the text align to the top.

_____________________________

Arizona Web Design - Mr Bobs Web Design in Arizona
The Arizona Web Hosting Challenge

(in reply to BobbyDouglas)
Giomanach

 

Posts: 6128
Joined: 11/19/2003
From: England
Status: offline

 
RE: CSS Alignment For Links - 7/11/2004 0:20:34   
Bobby

vertical-align: top; should do what you ask but I can never get it to work:)

Dan

_____________________________




(in reply to BobbyDouglas)
BobbyDouglas

 

Posts: 5470
Joined: 5/15/2003
From: Arizona
Status: offline

 
RE: CSS Alignment For Links - 7/11/2004 2:42:02   
I am not used to CSS much, but I thought that if you have an html page that is valid, and then a valid css, shouldn't it display the same in Firefox as it would in IE?

_____________________________

Arizona Web Design - Mr Bobs Web Design in Arizona
The Arizona Web Hosting Challenge

(in reply to Giomanach)
d a v e

 

Posts: 4167
Joined: 7/24/2002
From: England (but live in Finland now)
Status: offline

 
RE: CSS Alignment For Links - 7/11/2004 4:07:17   
one major difference between the 2 is the IE box model - i.e. how IE interprets paddings and margins and stuff.
http://css.maxdesign.com.au/listamatic/about-boxmodel.htm

_____________________________

David Prescott
Gekko web design

(in reply to BobbyDouglas)
Giomanach

 

Posts: 6128
Joined: 11/19/2003
From: England
Status: offline

 
RE: CSS Alignment For Links - 7/11/2004 4:39:07   
quote:

I am not used to CSS much, but I thought that if you have an html page that is valid, and then a valid css, shouldn't it display the same in Firefox as it would in IE?

I generally find that if you have it right for one....it won't be right in the other.....so you use Debs IE ahck free method. it's somewhere around here:):)

_____________________________




(in reply to d a v e)
d a v e

 

Posts: 4167
Joined: 7/24/2002
From: England (but live in Finland now)
Status: offline

 
RE: CSS Alignment For Links - 7/11/2004 5:26:25   
i think that vertical-align only works on block level elements and your links aren't block level, they're inline. (your divs are block level obviously but their contents are inline) swapping the padding values works as you discovered.

but why not use one of the horizontal lists at http://css.maxdesign.com.au/listamatic/index.htm ?

take one of the plain ones and apply your styles to it

_____________________________

David Prescott
Gekko web design

(in reply to Giomanach)
c1sissy

 

Posts: 5084
Joined: 7/20/2002
From: NJ
Status: offline

 
RE: CSS Alignment For Links - 7/11/2004 10:50:51   
quote:

block level elements


With css you can make a block level display inline. You migh want to look that up to see if this settles your problem for you.

How are you trying to get this to display? Here is a link for you
http://www.moronicbajebus.com/playground/cssplay/hormenu/

This is a terrific link to learn how to do things with displaying your links and how to get them to center, etc... If you have any problems after you read this and go through it, then come back for some help.

_____________________________

Deb-aka-c4Ksissy
high panjandurum and alpha female of the silverback tribe
As decreed by Jesper 5-24-2003.
The only stupid question is... the one that is never asked!!
http://directory.css-styling.com
http://fmsforum.com
http://positioniseverything.net/
http://www.tanfa.co.uk/

(in reply to d a v e)
d a v e

 

Posts: 4167
Joined: 7/24/2002
From: England (but live in Finland now)
Status: offline

 
RE: CSS Alignment For Links - 7/11/2004 10:52:16   
i was going to suggest that but it's easier - maybe - for you to achieve with the padding, but you might want to explore Deb's suggestion anyway to be sure!

_____________________________

David Prescott
Gekko web design

(in reply to c1sissy)
c1sissy

 

Posts: 5084
Joined: 7/20/2002
From: NJ
Status: offline

 
RE: CSS Alignment For Links - 7/11/2004 10:56:01   
lol I think we posted about the same time Dave.

The link that I posted above for bobby is a good one for doing your links with. I did post this in the css links section, but defiantly don't mind reposting for people to see it.

_____________________________

Deb-aka-c4Ksissy
high panjandurum and alpha female of the silverback tribe
As decreed by Jesper 5-24-2003.
The only stupid question is... the one that is never asked!!
http://directory.css-styling.com
http://fmsforum.com
http://positioniseverything.net/
http://www.tanfa.co.uk/

(in reply to d a v e)
d a v e

 

Posts: 4167
Joined: 7/24/2002
From: England (but live in Finland now)
Status: offline

 
RE: CSS Alignment For Links - 7/11/2004 10:59:04   
that's a good one haven't seen that before :)

_____________________________

David Prescott
Gekko web design

(in reply to c1sissy)
c1sissy

 

Posts: 5084
Joined: 7/20/2002
From: NJ
Status: offline

 
RE: CSS Alignment For Links - 7/11/2004 11:00:47   
I highly suggest going through it. In fact I have it printed out so that I have it to refer to while learning. (lol, you should see my print outs!:)

_____________________________

Deb-aka-c4Ksissy
high panjandurum and alpha female of the silverback tribe
As decreed by Jesper 5-24-2003.
The only stupid question is... the one that is never asked!!
http://directory.css-styling.com
http://fmsforum.com
http://positioniseverything.net/
http://www.tanfa.co.uk/

(in reply to d a v e)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> CSS Alignment For Links
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts