Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Impossible to style menu made from unordered list

Featured Replies

Hi everybody;



I'm trying to make a pretty basic horizontal drop down menu in dreamweaver.

I have Eric Meyer's css reset v2.0.



The problem i have is when i start styling the <li> tags inside
the <ul>, the changes appear in dreamweaver's design window, but
don't appear at all inside my browsers (firefox, opera, internet
explorer, chrome).



I've tried of course emptying the internet caches of each browser and
removing the css reset, but still no changes appear in the browsers,
while they clearly appear in dreamweaver.



I just can't wrap my head around this thing.

  • Author

Here's the html code:

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fiche technique bétons</title>
<link rel="shortcut icon" type="image/png" href="favicon.ico" />

<link rel="stylesheet" href="css_files/css_reset.css" type="text/css" />
<link rel="stylesheet" href="css_files/main_css.css" type="text/css" />
<link rel="stylesheet" href="css_files/navigation.css" type="text/css" />



</head>

<body>
<div id="outerwrapper">
<div id="header"> <img src="images/logo_1000px.jpg" width="1000" height="130" alt="logo" /></div>
<div id="nav">
<ul>
<li><a href="home.html">HOME</a></li>
<li><a href="a_engagements.html">ENTREPRISE OVERVIEW</a></li>
<li><a href="a_projets_neufs.html">PROJECTS</a></li>
<li><a href="a_beton_polyvalent.html">MATERIALS</a></li>
<li><a href="a_contact.php">CONTACT</a></li>
</ul>
</div>
</div><
</body>
</html>

 

 

Here's the css reset

@charset "utf-8";
/* CSS Document */



/**
* Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
* http://cssreset.com
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, l, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
font-family: Georgia, "Times New Roman", Times, serif;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
font-size: 16px;
}

blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

/* end of CSS RESET */

 

Here's the main css:

@charset "utf-8";
/* CSS Document */



<style type="text/css">
@import url("webfonts/square_metal_7_regular/stylesheet.css");
@import url("webfonts/Bank_gothic_md_medium/stylesheet.css");


#outerwrapper {
width: 1000px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
background-color: #3F3;
padding: 0px;
box-shadow: 6px 6px 5px 1px #818B94,-6px 6px 5px 1px #818B94;
height: 300px;
}
body {
background-image: url(images/paille-background.jpg);
background-repeat: repeat;
padding-bottom: 35px;
}
#outerwrapper #header {
width: 1000px;
background-color: #84B985;
background-position: center center;
height: 130px;
margin: 0px;
padding: 0px;
position: relative;
}
#outerwrapper #contentwrapper {
width: 100%;
background-color: #FDFDFD;
position: relative;
border-right-width: 1px;
border-left-width: 1px;
border-right-style: none;
border-left-style: none;
border-right-color: #A4A4A4;
border-left-color: #A4A4A4;
}
</style>


}
#pathway p a:active, #pathway p a:hover {
color: #CC0033;
text-decoration: none;
font-weight: bold;
font-family: Geneva, sans-serif, Verdana;
}
.bold {
font-weight: bold;
padding-left: 7px;
}
.italic {
font-style: italic;
}
#contentwrapper .category a img:hover {
padding: 2px;
}
.copyright {
font-size: 12px;
font-style: italic;
font-weight: bold;
color: #979797;
margin-left: auto;
margin-right: auto;
display: block;
text-align: center;
font-family: Georgia, "Times New Roman", Times, serif;
padding-bottom: 5px;
margin-top: 15px;
}
.darker {
color: #676767;
font-family: Georgia, "Times New Roman", Times, serif;
font-style: italic;
font-weight: bolder;
font-size: 1em;
}
</style>

 

Here's the nav css:

@charset "utf-8";
/* CSS Document */

#nav {
background-color: #9F6;
height: 30px;
width: 100%;
margin: 0px;
padding: 0px;
}
#nav ul {
list-style-type: circle;
position: relative;
margin: 0px;
padding: 0px;
}
#nav ul li {
float: left;
margin: 0px;
padding: 0px;
}
#outerwrapper #nav ul li a {
font-size: 2em;
}

 

Nothing looks obviously wrong with the CSS except that in the html head section the css file is navigation.css but lower down your post you refer to nav css. Check the filename.

 

In main_css.css you don't need <style type="text/css"> and </style>

 

</style> is there twice while <style type="text/css"> is there once.

  • Author

Thanks for pointing this out.

 

I've managed to get my horizontal menu going, but now i see it's rendered very differently whether it's viewed in one browser or the other.

 

Does anyone know someone offering the html and css codes for an browser universal pure css menu ? ( not for money)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.