473,587 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

get CSS to only affect one part of page

1 New Member
Looking to have the CSS code only affect the first list (menu items) and not the second. How to do this, specifically? If you could, copy/paste the edited code in your response. (I know it has something to do with DIV)

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html>
  2. <html>
  3.   <head>
  4.     <meta content="text/html; charset=windows-1252" http-equiv="content-type">
  5.     <title></title>
  6.     <style type="text/css">
  7.   ul {list-style: none;padding: 0px;margin: 0px;}
  8.   ul li {display: block;position: relative;float: left;border:1px solid #000}
  9.   li ul {display: none;}
  10.   ul li a {display: block;background: #000;padding: 5px 10px 5px 10px;text-decoration: none;
  11.            white-space: nowrap;color: #fff;}
  12.   ul li a:hover {background: #f00;}
  13.   li:hover ul {display: block; position: absolute;}
  14.   li:hover li {float: none;}
  15.   li:hover a {background: #f00;}
  16.   li:hover li a:hover {background: #000;}
  17.   #drop-nav li ul li {border-top: 0px;}
  18. </style></head>
  19.   <body>
  20.     <ul id="drop-nav">
  21.       <li><a href="#">Support</a></li>
  22.       <li><a href="#">Web Design</a>
  23.         <ul>
  24.           <li><a href="#">HTML</a></li>
  25.           <li><a href="#">CSS</a></li>
  26.           <li><a href="#">JavaScript</a></li>
  27.         </ul>
  28.       </li>
  29.       <li><a href="#">Content Management</a>
  30.         <ul>
  31.           <li><a href="#">Joomla</a></li>
  32.           <li><a href="#">Drupal</a></li>
  33.           <li><a href="#">WordPress</a></li>
  34.           <li><a href="#">Concrete 5</a></li>
  35.         </ul>
  36.       </li>
  37.       <li><a href="#">Contact</a>
  38.         <ul>
  39.           <li><a href="#">General Inquiries</a></li>
  40.           <li><a href="#">Ask me a Question</a></li>
  41.         </ul>
  42.       </li>
  43.     </ul>
  44.     <br>
  45.     <br>
  46.     <br>
  47.     <ol>
  48.       <li style="list-style-type: disc;"><a href="www.google.com">link1</a></li>
  49.       <li style="list-style-type: disc;"><a href="www.yahoo.com">link2</a></li>
  50.     </ol>
  51.   </body>
  52. </html>
May 2 '16 #1
0 7294

Sign in to post your reply or Sign up for a free account.

Similar topics

3
10567
by: Chuck Reed | last post by:
I have a MS Access data base that creates custom reports for clients in PDF form then prints the reports after all client's reports have been printed. The problem that I have run into is that when acrobat is printing to my printer, I can get it to print only the first page of a report(OPTION 1 BELOW) or it is spooled to the printer then...
4
1185
by: Joe Abou Jaoude | last post by:
hi I m facing the following problem often : In a web page the user can click on 2 buttons "button1" and "button2". If the user clicked on button1 then I have to validate part of the form (some controls musn't be validated), and if the user clicked on button2 then I have to validate the other part of the form. Usually I would do this by using...
4
2802
by: Jason | last post by:
I need to open a file for reading, but I only know part of it's name. The file I want to read is in the format of xxx-yyyy-zzz.EXT The last three digits of the file name are different on each pc, for example PC7 has xxx-yyyy-zz1.ext PC5 has xxx-yyyy-zz2.ext PC3 has xxx-yyyy-zz8.ext
0
1419
by: jobs | last post by:
I have a page where users select from a bunch of gridviews, setting session variables and then hit an a New or Edit button which redirects them to a formview in edit or insert mode. While in that formview page they might do a bunch of postbacks, so the back button might not always have the desired affect of taking them back to the calling...
2
2100
by: eBob.com | last post by:
I have a print application modeled on a program which I found via this newsgroup. (I still have comments in German in it!) The model uses ExtendedPrintPreviewDialog but I don't seem to have that so I am using PrintPreviewDialog. It prints fine. But the PrintPreview dialog shows only one blank page. Before I resort to posting code, is...
0
1055
by: thunder6 | last post by:
Hi, Can anyone please help me to make only a part of the text in a DataGridView cell bold, it shud look like this Size(in KB). Im trying to do this in a windows application Thank you
4
3444
by: Nik0001 | last post by:
Hello everyone! I have the following problem I need to download several HTML pages and get meta-tags out of the code. I decided it would be better to download only the meta-tags rather than downloading the whole page. But the standard method (HttpWebRequest) in C# only allows me to download the whole page. Is there some alternative...
3
3484
by: deames | last post by:
I have an access report that combines project data with project planning considerations. It includes several sub reports and VBA coding on the on print function to print lines between the different columns on the page. The report is grouped by project name and has a group header that contains the project name and column headings. For...
4
3818
by: kavi17 | last post by:
I need to add superscript in options. I tried many ways, but nothing worked. If add css to that text, that style is getting applied to entire text but want it for only a part of text.Please help me. If you can, also please help in any other way to add superscript in options.
0
7920
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8347
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7973
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5718
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5394
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3844
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2358
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1189
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.