|
-
Apr 7th, 2006, 10:07 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] More CSS problems :( (Resolved Again)
Ok went looking for some examples on how to make my website look cooler. I found a css example that was pretty simple and looked neat. Just a basic change of a hyperlinks background color on hover. Here's the code in the css page.
Code:
ul
{
float:left;
width:100%;
padding:0;
margin:0;
list-style-type:none;
}
a
{
float:left;
width:6em;
text-decoration:none;
color:White;
background-color:Navy;
padding:0.2em 0.6em;
border-right:1px solid white;
}
a:hover {background-color:Black}
li {display:inline}
My problem is that now i want to do a different kind of hyperlink on the same page, but i keep getting this style. I'm trying to create a seperate menu on the left that will be full of hyperlinks but i'd like them to be a different still. I put the links in a component and then dropped them on the page but i still get the same style. If you can point me in the right direction i'd appreciate it.
Thanks
Andy
Last edited by space_monkey; Apr 7th, 2006 at 11:27 AM.
Using VB6 or VB.net 2008 with .net 3.5
"Life... death... either way I'll be confined to a small cubicle!" - Hermes Conrad
-
Apr 7th, 2006, 10:11 AM
#2
Hyperactive Member
Re: More CSS problems :(
add a class to your origional hyperlink like this:
a.nav <- nav being the class
{
/*blah*/
}
a.nav:hover <- still nav class
{
/*blah*/
}
If this post helps, please RATE MY POST!
Using Visual Studio 2005 SE
-
Apr 7th, 2006, 10:12 AM
#3
Re: More CSS problems :(
Just create a new class for your "new" area that you want to apply the style to and provide the styles for the anchor accordingly. Then apply it to the desired anchors or elements.
Example use:
<a href="#" class="login" blah....
VB Code:
.login a {
background-color: #cccccc;
}
.login A:link, .login A:visited {
text-decoration: none;
color: #b22222;
}
.login A:hover {
text-decoration: underline;
color: #000000;
}
.login A:active {
background-color: #cccccc;
text-decoration: none;
color: #b22222;
}
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 7th, 2006, 10:22 AM
#4
Thread Starter
Fanatic Member
Re: More CSS problems :(
Freaking sweet guys. Thanks!
One day i might get the hang of this web site gui stuff.
Using VB6 or VB.net 2008 with .net 3.5
"Life... death... either way I'll be confined to a small cubicle!" - Hermes Conrad
-
Apr 7th, 2006, 10:55 AM
#5
Thread Starter
Fanatic Member
Re: More CSS problems :( (One more question)
Ok i've made the changes that guys recommened and it worked fine for the component. But when i drop that on to the form it seems like it forgets what i told it. Is that normal? The wierd thing is that it remembered what i set the background color too but forgot everything else. Any insight?
Last edited by space_monkey; Apr 7th, 2006 at 10:58 AM.
Using VB6 or VB.net 2008 with .net 3.5
"Life... death... either way I'll be confined to a small cubicle!" - Hermes Conrad
-
Apr 7th, 2006, 11:11 AM
#6
Thread Starter
Fanatic Member
Re: More CSS problems :( (One more question)
Well i was wrong its not seeing any of the formatting from the component, that is in the CSS. I can manually change the component and that will be reflected in the form but the css styles don't seem to be transfering for this control. But it is for the other two.
Using VB6 or VB.net 2008 with .net 3.5
"Life... death... either way I'll be confined to a small cubicle!" - Hermes Conrad
-
Apr 7th, 2006, 11:16 AM
#7
Re: More CSS problems :( (One more question)
I see your running 2005 so I can only assume since I have 2003 currently.
What does the source code look like? Is the class name specified in it? Are you also using additional styles on it?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 7th, 2006, 11:26 AM
#8
Thread Starter
Fanatic Member
Re: More CSS problems :( (One more question)
w00t i think i got it. I left out my <ul> tag with the class... Thanks anyway
Using VB6 or VB.net 2008 with .net 3.5
"Life... death... either way I'll be confined to a small cubicle!" - Hermes Conrad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|