SEO | Link Popularity | Search Engine Consulting | SEO Tutorial | SEO Tools | SEO Forum
Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-17-2005, 12:25 PM
DTEC DTEC is offline
SEO Junior
 
Join Date: Aug 2005
Posts: 20 DTEC is on a distinguished road
Specific Style

I am positive I know how to do this but I can seem to get anything to work,

I am trying to use a <ul > tag as my menu bar. I want the links to have a hover property such as

a:link {color:#339933}
a:visited {color:#330033}
a:hover {color:#336633}

however I cant remember how to apply this only to the links I want to modify( In Div3 of a 3DIV column layout)

I have tried

a#navbar
{
link{background-color: #339933}
visited{color:#330033}
hover{background-color: #336633}
}

I know that is no valid syntax but that what I am trying to achieve
Reply With Quote
  #2  
Old 08-17-2005, 03:40 PM
Paz's Avatar
Paz Paz is offline
SEO GUY Moderator
 
Join Date: Sep 2004
Location: Antalya, Turkey
Posts: 4,111 Paz has a spectacular aura aboutPaz has a spectacular aura about
Hi,

I'm not sure if the code you have written is standard, maybe you try something more like:

#navbar {width: 60px; height:650px;background-color:white;.....
div#navbar a:link {font-size:11px; font-weight:bold;color:#003399;text-decoration:none;}
div#navbar a:visited {font-size:11px; font-weight:bold;color: purple;text-decoration:none;}
div#navbar a:active {font-size:11px; font-weight:bold;color:#003399;text-decoration:none;}
div#navbar a:hover {font-size:11px;color:red;text-decoration:underline;}

It's important you set the font weights and decoration otherwise the text "wobbles" when you move the mouse over it.

Cheers,
Paz.
__________________
10.3 million entries for Hotels in Turkey but I'm still chipping away.
Reply With Quote
  #3  
Old 08-17-2005, 05:27 PM
DTEC DTEC is offline
SEO Junior
 
Join Date: Aug 2005
Posts: 20 DTEC is on a distinguished road
It Seems My CSS Tutorial wasnt the best then

Paz,

Thanks alot, I only learned CSS at the start of this week. Seems the site I used never went into enough detail or I didnt take it in enough.

"http://www.dtec-addonnis.co.uk" is the site I am doing a content and script rebuild for. I am using CSS and have got as far as http://www.dtec-addonnis.co.uk/indexbeta2.htm . I am using the CSS as Below;

html, body {
height: 100%;
}
body {
margin: 0px;
padding: 0px;
font-family:Tahoma;
font-size: 75%;
_font-size: 100%;
background-color: #FFFFFF;
}

div {margin: 0px;}
div#header {
border: solid 1px #336633;
clear: both;
font-family: Tahoma;
color: #339933;
background-color: #FFFFFF;
}
div#maincol {
display: table;
float: left;
min-height: 100%;
_height: 100%;
width: 100%;
background-color: #FFFFFF;
}
div#wrapper {display: table-row; vertical-align: top;}/* <- this is needed by Opera */
div#main {
border: solid 1px white;
min-height: 100%;
_height: 100%;
margin-left: 160px;
margin-right: 160px;
background-color: #339933;
color: #FFFFFF;
}
div#col2 {
float: left;
margin-left: -100%;
width: 160px;
background-color: #CCCCCC;
font-family: Tahoma;
color: #339933;
}
div#col3 {float: left; margin-left: -160px; width: 160px; background-color: #FFFFFF;}
ul
{ clear:right;
float:right;
width:100%;
padding:0;
margin:0;
list-style-type:none;
}
li {display:inline}
a#nav1
hover: {background-color:#33CC33;}
li {display:inline}
div.colwrapper {margin: 0px;}
div.content {padding: 1em;}
div.content div, pre {overflow: auto;}
div#footer {
border: solid 1px;
clear: both;
}
div.footerbgtrap {
background-color: #339933;
}

/* headings */
h1 {
font-size: 200%;
margin-top: 0;
font-family: Tahoma;
}
h2 {
font-size: 150%;
font-weight: normal;
font-family: Tahoma;
}

ins {
text-decoration: none;
}
object {
border: solid 1px black;
}
ul
{float:right; width:100%; padding:'0'; margin:'0'; list-style-type:none;
#navbar {width: 120px; height:650px;background-color:white;}
div#navbar a:link {
font-size:20px;
font-weight:bold;
color:#FFFFFF;
text-decoration:none;
background-color: #339933;
}
div#navbar a:visited {
font-size:20px;
font-weight:bold;
color: #FFFFFF;
text-decoration:none;
background-color: #339933;
}
div#navbar a:active {
font-size:20px;
font-weight:bold;
color:; text-decoration:none;
color: #FFFFFF;
}
div#navbar a:hover {
font-size:20px;
color:;
text-decoration:underline;
background-color: #33CC33;
color: #FFFFFF;
}

Some of it was from a template because I was having trouble getting the layout just right. The thing that Is bothering me now is the links in the right hand column (navbar div) I would like them to work top down in the centre of the div. Maybe not creating the style from scratch has staoved my learning curve, I feel that alot of this may not be standard after your previous post Paz.

Thanks
Reply With Quote
  #4  
Old 08-17-2005, 11:30 PM
Paz's Avatar
Paz Paz is offline
SEO GUY Moderator
 
Join Date: Sep 2004
Location: Antalya, Turkey
Posts: 4,111 Paz has a spectacular aura aboutPaz has a spectacular aura about
Hi,

that's not a bad start, though the "my3cols.css" template was missing from your website so I had to make my own...

Yes, vertical centering is tricky in css, but there are a few good resources such as:

http://www.jakpsatweb.cz/css/css-ve...r-solution.html

Cheers,
Paz.
__________________
10.3 million entries for Hotels in Turkey but I'm still chipping away.
Reply With Quote
  #5  
Old 08-18-2005, 12:11 PM
DTEC DTEC is offline
SEO Junior
 
Join Date: Aug 2005
Posts: 20 DTEC is on a distinguished road
Paz

Thanks for the resource, and I have added the stylesheet to the site now
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Forum Jump


Login/Register
User Name
Password
Remember Me?

Forum Links
Forum Home
SEO Forum
Internet Marketing Forum
Web Design Forum
Web Hosting Forum
Programming Forum
SEO Chat

Quick Links
Forum Home
New Posts
Mark Forums Read
Open Buddy List
User Control Panel
Edit Avatar
Edit Profile
Edit Options
Miscellaneous
Subscribed Threads
My Profile

Search Forums

Advanced Search
All times are GMT -8. The time now is 04:44 AM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.