CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 30th, 2009, 05:50 PM
akgd akgd is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 2 akgd User rank is Sergeant (500 - 2000 Reputation Level)akgd User rank is Sergeant (500 - 2000 Reputation Level)akgd User rank is Sergeant (500 - 2000 Reputation Level)akgd User rank is Sergeant (500 - 2000 Reputation Level)akgd User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 45 m 33 sec
Reputation Power: 0
Pop-out menu text gets tiny, box gets too big when I link CSS instead of embedding it

Issue resolved using forum search.

Thanks for having such great resources - I just had to search for a while.
Comments on this post
Skipt agrees: Good job using forum search.

Reply With Quote
  #2  
Old July 1st, 2009, 10:23 AM
Skipt's Avatar
Skipt Skipt is online now
CSS Guru in Training
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2009
Location: Maryland, USA
Posts: 2,044 Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)Skipt User rank is General 4th Grade (Above 100000 Reputation Level)  Folding Points: 84 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 2 h 7 m 43 sec
Reputation Power: 1225
Send a message via AIM to Skipt
Facebook
I am interested in this. Could you tell us what the problem was and what the solution was for other members benefits also? Thanks if you can :
__________________
"Quality of responses may vary. I reserve the right to change my mind for any reason what-so-ever without admitting I was wrong. I'd prefer to change your mind however, it's easier on my ego". - jwdonahue

Reply With Quote
  #3  
Old July 1st, 2009, 04:21 PM
akgd akgd is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 2 akgd User rank is Sergeant (500 - 2000 Reputation Level)akgd User rank is Sergeant (500 - 2000 Reputation Level)akgd User rank is Sergeant (500 - 2000 Reputation Level)akgd User rank is Sergeant (500 - 2000 Reputation Level)akgd User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 45 m 33 sec
Reputation Power: 0
Gladly!

Initially my menu was set up using embedded CSS (I'm a beginner with CSS) as shown here:
Code:
<head>
<style type="text/css" media="screen">

/**************** menu coding *****************/
#menu {
width: 12em;
background: #eee;
}

#menu ul {
list-style: none;
margin: 0;
padding: 0;
}

#menu a, #menu h2 {
font: bold 11px/16px arial, helvetica, sans-serif;
display: block;
border-width: 1px;
border-style: solid;
border-color: #ccc #888 #555 #bbb;
margin: 0;
padding: 2px 3px;
}

#menu h2 {
color: #fff;
background: #000;
text-transform: uppercase;
}

#menu a {
color: #000;
background: #efefef;
text-decoration: none;
}

#menu a:hover {
color: #a00;
background: #fff;
}

#menu li {
position: relative;
}

#menu ul ul ul {
position: absolute;
top: 0;
left: 100%;
width: 100%;
}

div#menu ul ul ul,
div#menu ul ul li:hover ul ul
{display: none;}

div#menu ul ul li:hover ul,
div#menu ul ul ul li:hover ul
{display: block;}

</style>
<!--[if IE]>
<style type="text/css" media="screen">
 #menu ul li {float: left; width: 100%;}
</style>
<![endif]-->
<!--[if lt IE 7]>
<style type="text/css" media="screen">
body {
behavior: url(csshover.htc);
font-size: 100%;
} 
#menu ul li {float: left; width: 100%;}
#menu ul li a {height: 1%;} 

#menu a, #menu h2 {
font: bold 0.7em/1.4em arial, helvetica, sans-serif;
} 

</style>
<![endif]-->



So, my layout is a vertical pop-out menu using the li and ul tags. After doing more research about CSS I decided that I wanted to link a separate CSS document to each HTML document, so that browsers would cache the CSS and I wouldn't have to scroll through so much code to get to things I wanted to edit on each page (since the website is a work in progress). I guess I should mention that I'm a self-taught beginner with CSS through the W3C website and other various resources. I have been testing how the website displayed on IE, Firefox, and Google Chrome (my default browser).

Anyway, I thought it would be as simple as taking out the CSS code and pasting it into another document but I ran into one problem - I had three style tags in my head section! One was the main style tag with all of the code for the menu, the other two were IE specific tags for the menu because some versions of IE didnt support some of the code I had embedded. I had read somewhere that you can link multiple CSS files to an HTML document, and I tried breaking up the main style tag and both IE tags into separate .css files, but when I saved the changes and viewed the updated page (with the three .css files linked), the text on the menu got incredibly small and the menu boxes got way too big. I thought there was something wrong with the code.
Here is the way I thought it should have looked:
Code:
<head>
<link rel=stylesheet href="style.css" title="HotSun" type="text/css" media="screen">
<link rel=stylesheet href="ie.css" title="HotSun" type="text/css" media="screen">
<link rel=stylesheet href="ie7.css" title="HotSun" type="text/css" media="screen">
</head> 


So I did more research on it, found this site and posted my question, then tried a different search query on this site. THEN I had a conversation with my dad who is somewhat of a "techie" but all of this code I am doing was way over his head. He offered the suggestion, "Well, can you link AND embed the CSS code?" GENIUS! I came back and looked up whether I could do both (it is possible) and lo and behold, my menu works now! I embedded the IE specific CSS code into the page and linked to the main menu code.
Here is the head section that now works just as it should:
Code:
<head>
<link rel=stylesheet href="style.css" title="HotSun" type="text/css" media="screen">
<!--[if IE]>
<style type="text/css" media="screen">
 #menu ul li {float: left; width: 100%;}
</style>
<![endif]--> 
<!--[if lt IE 7]>
<style type="text/css" media="screen">
body {
behavior: url(csshover.htc);
font-size: 100%;
} 
#menu ul li {float: left; width: 100%;}
#menu ul li a {height: 1%;} 
 
#menu a, #menu h2 {
font: bold 0.7em/1.4em arial, helvetica, sans-serif;
} 
 
</style>
<![endif]--> 
</head> 


I'm still not sure how to correctly link multiple CSS files to one HTML document, but my problem is solved for now. The entire site has a lot of work that needs to be done to it, I'm just glad to have gotten that out of the way.

By the way, for anyone else who's teaching themselves CSS, the W3C website is completely invaluable!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Pop-out menu text gets tiny, box gets too big when I link CSS instead of embedding it


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
Stay green...Green IT