/    Sign up×
Community /Pin to ProfileBookmark

CSS not working in Mozilla

I’m new to using CSS and don’t know what works cross browser yet. The code I’m using is very simple and works in IE, but none of it is working in Mozilla. Any hints as to what I’m doing wrong.

#HeaderContainer { width: 800px; height: 600px; border: solid 2px #00305c }
#Logo { position: relative; top: 0; left: 0 }
#Navbar { position: relative; left: 0; width: 20px; border: solid 2px #00305c }

Thanks

to post a comment
CSS

9 Comments(s)

Copy linkTweet thisAlerts:
@FangAug 08.2005 — and the HTML.....
Copy linkTweet thisAlerts:
@nbcrockettauthorAug 08.2005 — Sorry, going to fast.

<!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" />
<link href="file:///N:/Inetpub/wwwroot/Pages/Test/Include/Screen.css" rel="stylesheet" type="text/css" media="all" />
</head>

<body>
<div id="HeaderContainer">
<div id="Logo">
<img src="pages/test/include/Small%20Logo.jpg" alt="" height="116" width="240" border="0" />
</div>
<div id="Navbar">
<div id="NBTop"></div>
<div id="NBBody"></div>
</div>
</div>
</body>


</html>
Copy linkTweet thisAlerts:
@blah1985Aug 08.2005 — Ya change #style to .style and use class

See http://www.w3schools.com/css/css_syntax.asp
Copy linkTweet thisAlerts:
@ray326Aug 09.2005 — <link href="file:///N:/Inetpub/wwwroot/ . . .[/QUOTE]That's probably your problem.
change #style to .style and use class[/QUOTE]Not needed. The IDs only appear once on the page.
Copy linkTweet thisAlerts:
@gssplAug 09.2005 — Not needed
Copy linkTweet thisAlerts:
@nbcrockettauthorAug 09.2005 — Does Mozilla not recognize #Style?
Copy linkTweet thisAlerts:
@silverbullet24Aug 09.2005 — change

<link href="file:///N:/Inetpub/wwwroot/Pages/Test/Include/Screen.css" rel="stylesheet" type="text/css" media="all" />

to

<link href="/Pages/Test/Include/Screen.css" rel="stylesheet" type="text/css" media="all" />
Copy linkTweet thisAlerts:
@silverbullet24Aug 09.2005 — oh and

# = ID's - should appear only once on a page



. = classes - can appear many times on a page

both are supported by most broswers including mozilla
Copy linkTweet thisAlerts:
@nbcrockettauthorAug 09.2005 — Thanks, it's amazing how something so small can cause so much trouble. Thats code for you! Now if only I actually knew what I was doing. :eek:
×

Success!

Help @nbcrockett spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 2.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Samric24,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 10 SATS,

tipper: @neststayhome,
tipped: article
amount: 1000 SATS,
)...