31 maj 2012 19.17 justaguy wrote:
> #menu {
> float: right;
> text-align: right;
> background-color: #EFF9FC;
> }
the "#" designates an id, not a class. It's the "."-prefix that
designates a class in the html code and this selects it for the style
rules within the brackets.
So as selector you'd use ".menu" or "#nav" in this case.
#nav {
float: right;
text-align: right;
background-color: #EFF9FC;
}
I would recommend you get a book on CSS design. For me it was Andy
Clarke's "Transcending CSS" from 2006 that turned my life around. His
later "Hardboiled Web Design" is also good, but as good very
designeroriented intro I recommend the first title. This books teach a
very useful mindset and a lot of hard won knowledge.
/MiB
--
--
You received this because you are subscribed to the "Design the Web with CSS" at Google groups.
To post: css-design@googlegroups.com
To unsubscribe: css-design-unsubscribe@googlegroups.com
[Design with CSS 3738] Re: Why div align failed with Safari 5.05 for Windows
buyz,
The following div of nav is not right-aligned. Also, my previous code
works as expected for Firefox 12 (that is, the div is right-aligned
but not for Safari). And also, for the scripting language I'm using
for the app, # is a special character, it is escaped via prefixing
another one to it, I tried both ##menu and #menu to no avail (for div
alignment), hmm, not sure what's going on. Thanks.
DOM loaded
=======
<html>
<head>
<title>Quick Notes Access by Subject</title>
<style>
#menu {
float: right;
text-align: right;
background-color: #EFF9FC;
}
</style>
</head>
<body>
<div id="nav" class="menu">
<a href="fancyNote.cfm">Add Note</a>
<a href="logout.cfm">Logout</a>
<br/>
</div>
</body>
</html>
On May 31, 12:57 pm, buyz lots <buyzl...@gmail.com> wrote:
> Looks like your are applying those attributes to a class that does not exist (.menu) Use #log instead of .menu (I assume that is the div you are trying to float.) Also, remove the inline style from div#log for two reason, #1 inline styles are a bit gross, #2 align is not a css property.
> On May 31, 2012, at 12:36 PM, justaguy wrote:
>
>
>
>
>
>
>
> > .menu
--
--
You received this because you are subscribed to the "Design the Web with CSS" at Google groups.
To post: css-design@googlegroups.com
To unsubscribe: css-design-unsubscribe@googlegroups.com
The following div of nav is not right-aligned. Also, my previous code
works as expected for Firefox 12 (that is, the div is right-aligned
but not for Safari). And also, for the scripting language I'm using
for the app, # is a special character, it is escaped via prefixing
another one to it, I tried both ##menu and #menu to no avail (for div
alignment), hmm, not sure what's going on. Thanks.
DOM loaded
=======
<html>
<head>
<title>Quick Notes Access by Subject</title>
<style>
#menu {
float: right;
text-align: right;
background-color: #EFF9FC;
}
</style>
</head>
<body>
<div id="nav" class="menu">
<a href="fancyNote.cfm">Add Note</a>
<a href="logout.cfm">Logout</a>
<br/>
</div>
</body>
</html>
On May 31, 12:57 pm, buyz lots <buyzl...@gmail.com> wrote:
> Looks like your are applying those attributes to a class that does not exist (.menu) Use #log instead of .menu (I assume that is the div you are trying to float.) Also, remove the inline style from div#log for two reason, #1 inline styles are a bit gross, #2 align is not a css property.
> On May 31, 2012, at 12:36 PM, justaguy wrote:
>
>
>
>
>
>
>
> > .menu
--
--
You received this because you are subscribed to the "Design the Web with CSS" at Google groups.
To post: css-design@googlegroups.com
To unsubscribe: css-design-unsubscribe@googlegroups.com
Re: [Design with CSS 3737] Why div align failed with Safari 5.05 for Windows
Looks like your are applying those attributes to a class that does not exist (.menu) Use #log instead of .menu (I assume that is the div you are trying to float.) Also, remove the inline style from div#log for two reason, #1 inline styles are a bit gross, #2 align is not a css property.
On May 31, 2012, at 12:36 PM, justaguy wrote:
.menu
Subscribe to:
Posts (Atom)