CSS loading in Chinese - css

When I opened my webpage, the CSS was not working so I checked the console to see what was going on and it turns out it wasn't loading because my CSS was in Chinese, even though it is English in my Sublime Text program.
Here is the Chinese:
⨯䜠湥牥污䌠卓映牯攠敶祲瀠条⁥⼪਍汵渣癡笠਍瀉獯瑩潩㩮猠楴正㭹਍††楬瑳猭祴敬琭灹㩥渠
湯㭥਍††慭杲湩›㬰਍††慰摤湩㩧〠഻ †漠敶晲潬㩷栠摩敤㭮਍††慢正牧畯摮挭汯牯›㌣㑆㑄㬲਍††
潢⵸桳摡睯›瀰⁸瀸⁸㘱硰〠硰爠执⡡ⰰⰰⰰ⸰⤲഻ऊൽഊ氊⹩慮⁶ൻ †映潬瑡›敬瑦഻ऊൽഊ氊⁩ⱡ愠瀮摡
笠਍††楤灳慬㩹椠汮湩ⵥ汢捯㭫਍††潣潬㩲⌠㉅㙅㍅഻ †琠硥⵴污杩㩮挠湥整㭲਍††慰摤湩㩧㈠瀰⁸
㔲硰഻ †琠硥⵴敤潣慲楴湯›潮敮഻ऊ潦瑮猭穩㩥㈠瀰㭸਍昉湯⵴慦業祬›匧畯捲⁥慓獮倠潲Ⱗ猠湡⵳敳
楲㭦਍紉਍਍楬愠瀮摡笠਍瀉摡楤杮›〲硰㘠瀰㭸਍紉਍਍楬渮癡愠栺癯牥笠਍戉捡杫潲湵ⵤ潣潬㩲⌠䐸
㤹〹഻ऊൽഊ氊⁩⹡捡楴敶栺癯牥笠਍按汯牯›䔣䔲䔶㬳਍紉਍ഉ栊浴ⱬ戠摯⁹ൻ †洠牡楧㩮〠഻ †瀠摡
楤杮›㬰਍戉捡杫潲湵ⵤ潣潬㩲爠执㠨ⰹ㤠ⰸㄠ㘰㬩਍紉਍਍⹡捡楴敶笠਍戉捡杫潲湵ⵤ潣潬㩲⌠㉅㙅㍅
※਍按汯牯›㌣㑆㑄㬲਍紉਍਍爣杩瑨慮⁶ൻऊ汦慯㩴爠杩瑨഻ऊൽഊ瀊笠਍洉牡楧⵮潢瑴浯›瀲㭸
਍ൽഊ栊笱਍洉牡楧⵮潢瑴浯›瀳㭸਍
My CSS is supposed to load as:
ul#nav {
position: sticky;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #3F4D42;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
li.nav {
float: left;
}
li a, a.pad {
display: inline-block;
color: #E2E6E3;
text-align: center;
padding: 20px 25px;
text-decoration: none;
font-size: 20px;
font-family: 'Source Sans Pro', sans-serif;
}
li a.pad {
padding: 20px 60px;
}
li.nav a:hover {
background-color: #8D9990;
}
li a.active:hover {
color: #E2E6E3;
}
html, body {
margin: 0;
padding: 0;
background-color: rgb(89, 98, 106);
}
a.active {
background-color: #E2E6E3;
color: #3F4D42;
}
#rightnav {
float: right;
}
p {
margin-bottom: 2px;
}
h1{
margin-bottom: 3px;
}

Related

Having trouble once I added iframe

This is sort of the same issue I asked here: Cannot get two CSS elements to be next to each other
However, this time, it's messing up when I added an iframe. I tried applying different styles, even to the iframe, but it doesn't appear to be working. I also messed with the CSS of the ul and li that I added to the side nav bar (didn't help, though changing the ul property to display: table-row; did fix another issue I had with something else.)
My main plan was to have an iframe to another group of pages. (My restaurant pages might have more than one tab for each restaurant, but I had been wondering how to have a "back" thing to my ski resort (where the restaurants are) so the user could go back to them. I then thought, why not just have an iframe instead?
However, once I added the iframe, the trouble I had before (see previous stack overflow link above) suddenly came back.
main.css:
#logo
{
border: 1px dashed purple;
width: 1050;
height: 75;
}
#logo > img
{
width: 1050;
height: 75;
}
.floatleft
{
float: left;
}
.floatright
{
float: right;
}
#content
{
border-left: 3px solid #283379;
border-right: 3px solid #283379;
text-align: left;
margin: 0 auto;
width: 960px;
background-color: #ffffff;
background-repeat: repeat-y;
height: 800;
}
nav
{
border: 10px solid transparent;
padding: 15px;
border-image-source: url(./blue-diamond.gif);
border-image-repeat:repeat;
border-image-slice: 30;
background-color: 2211ff;
font-family: "Impact", Times, serif;
font-size: 110%;
}
nav#vert
{
width: 220px;
height: 540px;
margin: 0px;
display:table-cell;
}
body {
color: #000000;
margin: 0;
padding: 0;
font-family: Helvetica, Arial, sans-serif;
font-size: 16px;
background-color: #422520;
background-image: url(./snow_mountain.jpg);
background-repeat:no-repeat;
background-size:cover;
text-align: center;
background-attachment: fixed;
background-position: center;
}
#footerContainer
{
border-left: 3px solid #283379;
border-right: 3px solid #283379;
text-align: left;
margin: 0 auto;
width: 980px;
background-color: #ffffff;
background-repeat: repeat-y;
}
footer
{
border: 10px solid transparent;
padding: 15px;
text-align: left;
margin: 0 auto;
width: 1000px;
background-repeat: repeat-y;
border-image-source: url(./blue-diamond.gif);
border-image-repeat:repeat;
border-image-slice: 30;
background-color: 2211ff;
font-family: "Impact", Times, serif;
font-size: 14px;
color: white;
}
footer > a
{
color: white;
font-family: "Impact", Times, serif;
font-size: 14px;
}
#container
{
border-left: 3px solid #283379;
border-right: 3px solid #283379;
text-align: left;
margin: 0 auto;
width: 1050px;
background-color: #ffffff;
background-repeat: repeat-y;
height: 750px;
}
nav > a
{
color: #ccccff;
}
nav#hor > div
{
border: 1px solid white;
float: left;
padding: 10px;
background-color: #000044;
}
nav#hor
{
width: 1000px;
height: 50px;
margin: 0;
font-size: 110%;
}
nav#hor a
{
color: rgb(0 0,238);
}
nav#hor > div > a
{
color: #ccccff;
text-decoration: none;
font-size: 100%;
}
nav#hor>div:hover
{
background-color: #018802;
}
h1
{
font-family: "MV Boli", Times, Serif;
font-style: bold;
text-align: center;
font-size: 36px;
}
h2
{
font-family: "MV Boli", Times, Serif;
font-style: bold;
text-align: center;
font-size: 26px;
}
h3
{
font-family: "MV Boli", Times, Serif;
font-style: bold;
text-align: center;
font-size: 20px;
}
#text-container
{
border: 2px solid cyan;
width: 1005px;
height: 690px;
*/ zoom: 1;
*/ margin: 0;
display: table-cell;
padding-top: 10px;
padding-right: 10px;
padding-bottom: 10px;
padding-left: 10px;
}
#text-container:after
{
clear: both;
content: ".";
display: block;
height: 0;
visibility:hidden;
}
#text-container > p
{
font-family: "Myriad Web Pro", Times, Serif;
font-size: 18px;
}
.left img
{
float: left;
padding: 0 20px 20px 0;
}
.left > p
{
font-family: "Myriad Web Pro", Times, Serif;
font-size: 18px;
}
.right img
{
float: right;
margin: 0px 0px 15px 20px;
border: 1px solid transparent;
}
.right > p
{
font-family: "Myriad Web Pro", Times, Serif;
font-size: 18px;
}
nav#hor ul
{
list-style-type: none;
margin: 0;
padding: 0;
overflow: auto;
background-color: #000044;
}
nav#hor ul li:hover
{
background-color: #018802;
}
nav#vert ul
{
list-style-type: none;
margin: 0;
padding: 0;
overflow: auto;
background-color: #000044;
display: table-row;
}
nav#hor li
{
float: left;
border: 1px solid white;.
}
nav#vert li
{
float: left;
border: 1px solid white;.
}
nav#vert li a, .dropbtn {
display: inline-block;
// color: white;
text-align: center;
padding: 8px 8px;
text-decoration: none;
}
nav#hor li a, .dropbtn {
display: inline-block;
// color: white;
text-align: center;
padding: 8px 8px;
text-decoration: none;
}
nav#hor li a:hover, .dropdown:hover .dropbtn {
background-color: #018802;
}
nav#vert li a:hover, .dropdown:hover .dropbtn {
background-color: #018802;
}
li.dropdown {
display: inline-block;
}
.dropdown-content ul li
{
width: 100%;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
color: rgb(0, 0, 238);
z-index: 1;
}
#eAndADropdown
{
}
#restaurantDropdown li
{
background-color: #000044;
border: 1px solid white;
}
#restaurantDropdown ul
{
border: 1px solid white;
}
#restaurantDropdown:hover
{
background-color: #018802;
}
#restaurantDropdown a
{
color: rgb(0, 0, 238);
}
.dropdown-content a {
color: rgb(0, 0, 238);
border: 1 px solid white;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {background-color: #f1f1f1}
.show {display:block;}
li a
{
color: rgb(0, 0, 238);
}
testingMongoose.php
<html>
<head>
<title> The Mountains </title>
<link rel="stylesheet" type="text/css" href="./main.css">
<link rel="icon" href="./ski_icon.png">
<script src="jquery-3.0.0.min.js" type="text/javascript"></script>
<script>
$( document ).ready(function() {
$("#container").css("height", 800);
});
</script>
</head>
<body>
<?php include 'topandside.php';?>
<div id="text-container">
<iframe src="./index.php" width=700; height=620;></iframe>
</div>
</div>
</div>
<?php include 'footer.php';?>
</div>
</body>
</html>
This time, having display: table-cell; for both nav#vert and #text-content doesn't appear to be enough like it was before.
float: left on the nav#vert seems to have fixed that issue, though it broke some other things (though I should be able to fix those.)

grey line on top of my visual studio website

I'm currently working on a website.. I've check the css but I can't seem to figure out why this grey line keeps on showing on top of my Visual Studio website website... I'm using the default Site.css present when creating a asp.net website... please help....
my css:
/* DEFAULTS
----------------------------------------------------------*/
body
{
background: #b6b7bc;
font-size: .80em;
font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
margin: 0px;
padding: 0px;
color: #696969;
}
a:link, a:visited
{
color: #034af3;
}
a:hover
{
color: #1d60ff;
text-decoration: none;
}
a:active
{
color: #034af3;
}
p
{
margin-bottom: 10px;
line-height: 1.6em;
}
/* HEADINGS
----------------------------------------------------------*/
h1, h2, h3, h4, h5, h6
{
font-size: 1.5em;
color: #666666;
font-variant: small-caps;
text-transform: none;
font-weight: 200;
margin-bottom: 0px;
}
h1
{
font-size: 1.6em;
padding-bottom: 0px;
margin-bottom: 0px;
}
h2
{
font-size: 1.5em;
font-weight: 600;
}
h3
{
font-size: 1.2em;
}
h4
{
font-size: 1.1em;
}
h5, h6
{
font-size: 1em;
}
/* this rule styles <h1> and <h2> tags that are the
first child of the left and right table columns */
.rightColumn > h1, .rightColumn > h2, .leftColumn > h1, .leftColumn > h2
{
margin-top: 0px;
}
/* PRIMARY LAYOUT ELEMENTS
----------------------------------------------------------*/
.page
{
width: 960px;
background-color: #fff;
margin: 20px auto 0px auto;
border: 1px solid #496077;
}
.header
{
position: relative;
margin: 0px;
padding: 0px;
background: #4b6c9e;
width: 100%;
}
.header h1
{
font-weight: 700;
margin: 0px;
padding: 0px 0px 0px 20px;
color: #f9f9f9;
border: none;
line-height: 2em;
font-size: 2em;
}
.main
{
padding: 0px 12px;
margin: 12px 8px 8px 8px;
min-height: 420px;
}
.leftCol
{
padding: 6px 0px;
margin: 12px 8px 8px 8px;
width: 200px;
min-height: 200px;
}
.footer
{
color: #4e5766;
padding: 8px 0px 0px 0px;
margin: 0px auto;
text-align: center;
line-height: normal;
}
/* TAB MENU
----------------------------------------------------------*/
div.hideSkiplink
{
background-color:#3a4f63;
width:100%;
}
div.menu
{
padding: 4px 0px 4px 8px;
}
div.menu ul
{
list-style: none;
margin: 0px;
padding: 0px;
width: auto;
}
div.menu ul li a, div.menu ul li a:visited
{
background-color: #465c71;
border: 1px #4e667d solid;
color: #dde4ec;
display: block;
line-height: 1.35em;
padding: 4px 20px;
text-decoration: none;
white-space: nowrap;
}
div.menu ul li a:hover
{
background-color: #bfcbd6;
color: #465c71;
text-decoration: none;
}
div.menu ul li a:active
{
background-color: #465c71;
color: #cfdbe6;
text-decoration: none;
}
/* FORM ELEMENTS
----------------------------------------------------------*/
fieldset
{
margin: 1em 0px;
padding: 1em;
border: 1px solid #ccc;
}
fieldset p
{
margin: 2px 12px 10px 10px;
}
fieldset.login label, fieldset.register label, fieldset.changePassword label
{
display: block;
}
fieldset label.inline
{
display: inline;
}
legend
{
font-size: 1.1em;
font-weight: 600;
padding: 2px 4px 8px 4px;
}
input.textEntry
{
width: 320px;
border: 1px solid #ccc;
}
input.passwordEntry
{
width: 320px;
border: 1px solid #ccc;
}
div.accountInfo
{
width: 42%;
}
/* MISC
----------------------------------------------------------*/
.clear
{
clear: both;
}
.title
{
display: block;
float: left;
text-align: left;
width: auto;
}
.loginDisplay
{
font-size: 1.1em;
display: block;
text-align: right;
padding: 10px;
color: White;
}
.loginDisplay a:link
{
color: white;
}
.loginDisplay a:visited
{
color: white;
}
.loginDisplay a:hover
{
color: white;
}
.failureNotification
{
font-size: 1.2em;
color: Red;
}
.bold
{
font-weight: bold;
}
.submitButton
{
text-align: right;
padding-right: 10px;
}
(This is based on Blender's answer, I will delete this if Blender will post his answer)
In order to be formal and to have an answer to this question, as what Blender suggested change
margin: 20px auto 0px auto;
to
margin: 0px auto 0px auto;
This solved the issue according to the one who asked the question.

fixed size header in css styles

I have written this styles:
but it doesnt works well in IE
it appear in IE like this: http://fb812yh3737x2812.byethost3.com/IE.png
but i wanna be like this in chrome : http://fb812yh3737x2812.byethost3.com/chr.png
/*css template designed by AmzMohammad*/
body {
margin: 0px;
padding: 0px;
background: url(images/img01.jpg) repeat left top;
font: 14px B Nazanin, Helvetica, sans-serif;
color: #212121;
}
h1, h2, h3 {
margin-top: 0px;
}
h1 {
font-size: 3.0em;
}
h5 {
font: 45px "IranNastaliq","B Nazanin" ,Helvetica, sans-serif;
}
h7 {
margin-bottom: 0px;
font: 33px "Forte","Times New Roman (Headings CS)","Times Roman","Arial (Body CS)","Adobe Caslon Pro Bold","Agency FB","arial", Helvetica , sans-serif ;
}
h2 {
font-size: 1.8em;
}
h6 {
font-size: 1.1em;
}
h3 {
font-size: 1.4em;
}
h4 {
font-size: 1.0em;
}
p, ol, ul {
margin-bottom: 0em;
line-height: 160%;
}
a {
color: #393939;
}
a:hover {
text-decoration: none;
color: #393939;
}
a img {
border: none;
}
/* Header */
#header {
width: 900px;
height: 150px;
margin: 5px auto;
background: #393939;
}
#header a {
text-decoration: none;
color: #FFFFFF;
background: #393939;
}
/* Logo */
#logo {
float: left;
padding-left: 375px;
padding-right: 275px;
background: url(images/head.jpg) no-repeat left 100% ;
}
#logo h1, #logo p {
margin: auto;
line-height: normal;
font-weight: normal;
color: #393939;
}
#logo p {
padding-left: 0px;
}
#logo h1 {
padding: 25px 0px 0px 0px;
}
#logo h5 {
margin: 0px;
padding: 5px 0px 0px 0px;
}
#logo h7 {
margin-top: 0px;
padding: 5px 0px 0px 0px;
}
#logo h4 {
margin: 0px;
padding: 0px 0px 0px 0px;
}
#logo a {
color: #393939;
}
/* Menu */
#menu {
list-style: none;
float: left;
list-style: none;
margin: 0;
padding: 0;
width: 900px;
background: #393939;
}
#menu ul {
margin: 0px 0 0 0;
padding: 0px 0px 0px 0px;
list-style: none;
line-height: normal;
}
#menu li {
float: left;
font: 120% "B zar" ,"Adobe Arabic";
margin: 0;
padding: 0;
background: #393939;
}
#menu a {
display: block;
float: left;
margin: 0;
padding: 8px 12px;
text-decoration: none;
background: #393939;
}
#menu a:hover {
background: #cff;
color:#393939;
color:#393939;
}
#menu .first {
background: none;
}
#menu .active a {
}
/* Page */
#page {
width: 900px;
margin: 3px auto;
padding: 30px 0px;
}
/* Content */
#content {
float: left;
width: 570px;
}
.post {
margin: 0px 0px 30px 0px;
}
.post .title {
margin: 0px;
padding: 0px 0px 5px 0px;
border-bottom: #BFC9AE dashed 1px;
color: #232F01;
}
.post .title a {
color: #232F01;
}
.post .entry {
}
.post .meta {
font-weight: bold;
}
.post .byline {
margin: 0px;
color: #5E5E5E;
}
/* Sidebar */
#sidebar {
float: left;
width: 300px;
}
#sidebar-bgtop {
height: 3px;
}
#sidebar-bgbtm {
height: 3px;
}
#sidebar-content {
padding: 0px;
}
#sidebar ul {
margin: 15px;
padding: 0px;
list-style: none;
}
#sidebar li ul {
margin-bottom: 1.8em;
list-style: none;
}
#sidebar li li {
padding: 5px 0;
border-bottom: #BFC9AE dashed 1px;
}
#sidebar h2 {
padding: 4px 20px;
background: #393939;
font-size: 1.2em;
color: #FFFFFF;
}
#sidebar a {
text-decoration: none;
color: #232F01;
}
#sidebar a:hover {
text-decoration: underline;
}
#sidebar h6 {
margin: 0px;
padding: 0px 0px 0px 0px;
}
/* Search */
#search {
}
#search form {
margin-bottom: 1.8em;
padding: 0px;
}
#search fieldset {
margin: 0px;
padding: 0px;
border: none;
}
#search #s {
width: 160px;
}
/* Footer */
#footer {
clear: both;
width: 900px;
height: 50px;
margin: 0px auto 30px auto;
color: #FFFFFF;
background: #393939;
}
#footer p {
margin: 0px;
padding: 19px 0px 0px 0px;
text-align: center;
line-height: normal;
font-size: smaller;
}
#footer a {
color: #FFFFFF;
}
cheers
the html of header :
<div id="header">
<div id="logo">
<h7 align="center">Mohammad Mahmoodi</h7>
<p>Department of Computer Engineering, Faculty of Engineering, University of Isfahan</p>
</div>
<!-- end #logo -->
<div id="menu">
<ul>
<li class="first">Home</li>
<li>Teaching & Courses</li>
<li>Curriculum Vitae</li>
<li>Students</li>
<li>Research Interests</li>
<li>Publications</li>
<li>attraction point</li>
<li>Font</li>
<li>Farsi</li>
</ul>
</div>
<!-- end #menu -->
</div>
When you downloaded that font, (because I assume that's not a standard font) it may have come in .TTF format, IE doesn't always recognise these files try converting it to .EOT and embed it on the site for more modern versions of IE compatibility.
This generally only works for IE but i suppose if chrome is already recognising it you will most probably be OK for other browser

ASP.Net MVC Music Store Tutorial CSS Layout issue

I just completed an MVC tutorial, but some of my webpages don't look right. This is mine:
But it's supposed to look like this:
The code for this page is:
#model MvcSuper.Models.MusicStore.Genre
#{
ViewBag.Title = "Browse Albums";
}
<div class="genre">
<h3><em>#Model.Name</em> Albums</h3>
<ul id="album-list">
#foreach (var album in Model.Albums)
{
<li>
<a href="#Url.Action("Details",
new { id = album.AlbumId })">
<img alt="#album.Title"
src="#album.AlbumArtUrl" />
<span>#album.Title</span>
</a>
</li>
}
</ul>
</div>
The left menu (partial view):
#model IEnumerable<MvcSuper.Models.MusicStore.Genre>
<ul id="categories">
#foreach (var genre in Model)
{
<li>#Html.ActionLink(genre.Name,
"Browse", "MusicStore",
new { Genre = genre.Name }, null)
</li>
}
</ul>
Entire CSS:
{
margin: 0px;
padding: 0px;
border: none;
}
body
{
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
background-color: #FBF9EF;
padding: 0px 6%;
}
#container
{
float: left;
}
#header
{
float: left;
width: 100%;
border-bottom: 1px dotted #5D5A53;
margin-bottom: 10px;
}
#header h1
{
font-size: 18px;
float: left;
background: url(/content/Images/logo.png) no-repeat;
padding: 45px 0px 5px 0px;
}
#promotion
{
height: 300px;
width: 700px;
background: url(/content/Images/home-showcase.png) no-repeat;
}
ul li a
{
font-size: 16px;
}
#main
{
overflow: hidden;
padding: 0 0 15px 10px;
float: left;
}
ul
{
list-style-type: square;
margin-left: 25px;
font-size: 14px;
}
ul#album-list
{
list-style: none;
margin-left: 0px;
}
ul#album-list li
{
height: 130px;
width: 100px;
float: left;
margin: 10px;
text-align: center;
}
ul#album-list li a, ul#album-list li .button
{
font-size: 13px;
float: left;
}
ul#album-list li a span
{
color: #9b9993;
text-decoration: underline;
}
#cart
{
float: right;
}
#update-message
{
color: #F6855E;
font-weight: bold;
}
.button, input[type=submit]
{
clear: both;
display: inline-block;
padding: 5px;
margin-top: 10px;
border: 1px;
background: #5e5b54;
color: #fff;
font-weight: bold;
}
.button a
{
color: #fff !important;
}
#footer
{
clear: both;
padding: 10px;
text-align: right;
border-top: 1px dotted #8A8575;
border-bottom: 1px dotted #8A8575;
font-family: Constantia, Georgia, serif;
}
/******************** Top Navigation ************************/
ul#navlist
{
float: right;
}
ul#navlist li
{
display: inline;
}
ul#navlist li a
{
border-left: 1px dotted #8A8575;
padding: 10px;
margin-top: 10px;
color: #8A8575;
text-decoration: none;
float: left;
}
ul#navlist li:first-child a
{
border: none;
}
ul#navlist li a:hover
{
color: #F6855E;
}
/********************* End top navigation ***************************/
p
{
margin-bottom: 15px;
margin-top: 0px;
}
h2
{
color: #5e5b54;
}
h2, h3
{
margin-bottom: 10px;
font-size: 16px;
font-style: italic;
font-weight: bold;
}
h3
{
color: #9B9993;
}
#header h1 a, h3 em
{
color: #5E5B54;
}
a:link, a:visited
{
color: #F6855E;
text-decoration: none;
font-weight: bold;
}
a:hover
{
color: #333333;
text-decoration: none;
font-weight: bold;
}
a:active
{
color: #006633;
text-decoration: none;
font-weight: bold;
}
/***************************** sidebar navigation ****************************/
#categories
{
font-family: Constantia, Georgia, serif;
list-style-type: none;
border-right: #5d5a53 1px dotted;
padding-right: 10px;
margin: 0 25px 0 0;
float: left;
}
#categories a:link, #categories a:visited
{
color: #9B9993;
text-decoration: none;
}
#categories a:hover
{
color: #F46739;
}
div#album-details p
{
margin-bottom: 5px;
color: #5e5b54;
font-weight: bold;
}
p em
{
color: #9b9993;
}
/* Form styles */
legend
{
padding: 10px;
font-weight: bold;
}
fieldset
{
border: #9b9993 1px solid;
padding: 0 10px;
margin-bottom: 10px;
clear: left;
}
div.editor-field
{
margin-bottom: 10px;
}
input[type=text], input[type=password], select
{
border: 1px solid #8A8575;
width: 300px;
}
/* Styles for validation helpers */
.field-validation-error {
color: #ff0000;
}
.field-validation-valid {
display: none;
}
.input-validation-error {
border: 1px solid #ff0000;
background-color: #ffeeee;
}
.validation-summary-errors {
font-weight: bold;
color: #ff0000;
}
.validation-summary-valid {
display: none;
}
/* Tables */
table
{
border: 1px solid #000;
border-collapse: collapse;
color: #666666;
min-width: 500px;
width: 100%;
}
tr
{
border: 1px solid #000;
line-height: 25px;
}
th
{
background-color: #9b9993;
color: #000;
font-size: 13px;
text-align: left;
}
th, td
{
padding-left: 5px;
}
tr:hover
{
background-color: #fff;
}
I did download the source code (the author's finished version), and it turned out like mine when I ran it. The top most screenshot is from FF4 on XP, but it looks the same in IE8 on XP. Any ideas?
To push that Album listing back up to its rightful place and put your mind at ease...
add a width to your main css class:
#main
{
overflow: hidden;
padding: 0 0 15px 10px;
float: left;
width: 500px;
}
also add a * to first css class
*{
margin: 0px;
padding: 0px;
border: none;
}
Just take it easy. I'm pretty sure that this is the case of specific browser or some extra tricky css code, nothing more. Make sure you understand all the things that tutorial says and let the screen be as it is

CSS3 div all over the place

I am struggling mightily with the following CSS3 code:
*
{
margin: 0px;
padding: 0px;
border: none;
}
body
{
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DBDBDB), to(#FFFFFF), color-stop(.7,#FFFFFF));
padding: 0px 6%;
}
#nav {
background: url(http://74.71.27.20/d499/content/images/nav_background.png);
}
ul#nav {
float: left;
}
ul#nav li {
display: inline;
width: 100%;
}
ul#nav li a {
display: inline;
float: left;
margin-right: 25px;
margin-left: 10px;
font-size: 16px;
line-height: 44px;
text-align: center;
text-decoration: none;
color: #777;
}
ul#nav li a:hover {
color: #fff;
}
ul#nav li.selected a {
color: #fff;
}
ul#nav li.subscribe a {
margin-left: 22px;
padding-left: 33px;
text-align: left;
background: url(http://74.71.27.20/d499/content/images/rss.png) left center no-repeat;
}
#container
{
float: left;
background: #FFFFFF;
overflow: hidden;
padding: 0 0 15px 10px;
}
#header
{
float: left;
width: 100%;
margin-bottom: 10px;
}
#header h1
{
font-size: 18px;
float: left;
background: url(http://74.71.27.20/d499/content/Images/logo.png) no-repeat;
padding: 45px 0px 5px 0px;
}
#promotion
{
height: 300px;
width: 700px;
background: url(http://74.71.27.20/d499/content/Images/home-showcase.png) no-repeat;
}
ul li a
{
font-size: 16px;
}
#main
{
float: left;
overflow: hidden;
padding: 0 0 15px 10px;
}
ul
{
list-style-type: square;
margin-left: 25px;
font-size: 14px;
}
ul#album-list
{
list-style: none;
margin-left: 0px;
}
ul#album-list li
{
height: 130px;
width: 100px;
float: left;
margin: 10px;
text-align: center;
}
ul#album-list li a, ul#album-list li .button
{
font-size: 13px;
float: left;
}
ul#album-list li a span
{
color: #9b9993;
text-decoration: underline;
}
#cart
{
float: right;
}
#update-message
{
color: #F6855E;
font-weight: bold;
}
.button, input[type=submit]
{
clear: both;
display: inline-block;
padding: 5px;
margin-top: 10px;
border: 1px;
background: #5e5b54;
color: #fff;
font-weight: bold;
}
.button a
{
color: #fff !important;
}
footer {
float: left;
left: 0;
width: 100%;
background: #222;
}
footer div {
display: table;
margin: 0 auto;
padding: 44px 0;
width: 940px;
color: #777;
}
p
{
margin-bottom: 15px;
margin-top: 0px;
}
h2
{
color: #5e5b54;
}
h2, h3
{
margin-bottom: 10px;
font-size: 16px;
font-style: italic;
font-weight: bold;
}
h3
{
color: #9B9993;
}
#header h1 a, h3 em
{
color: #5E5B54;
}
a:link, a:visited
{
color: #F6855E;
text-decoration: none;
font-weight: bold;
}
a:hover
{
color: #333333;
text-decoration: none;
font-weight: bold;
}
a:active
{
color: #006633;
text-decoration: none;
font-weight: bold;
}
/***************************** sidebar navigation ****************************/
#categories
{
float: left;
margin: 22px 0 0 22px;
padding: 11px 22px;
background: url(http://74.71.27.20/d499/content/images/sidebar_section_background.png) repeat-x;
/* Border-radius not implemented yet */
-moz-border-radius: 11px;
-webkit-border-radius: 11px;
}
ul#categories
{
siaply: inlinel
margin: 0 0 0 22px;
list-style: none;
}
#categories a:link, #categories a:visited
{
float: left;
color: #9B9993;
text-decoration: none;
}
#categories a:hover
{
color: #F46739;
}
div#album-details p
{
margin-bottom: 5px;
color: #5e5b54;
font-weight: bold;
}
p em
{
color: #9b9993;
}
/* Form styles */
legend
{
padding: 10px;
font-weight: bold;
}
fieldset
{
border: #9b9993 1px solid;
padding: 0 10px;
margin-bottom: 10px;
clear: left;
}
div.editor-field
{
margin-bottom: 10px;
}
input[type=text], input[type=password], select
{
border: 1px solid #8A8575;
width: 300px;
}
/* Begin: Tables */
table
{
border: 1px solid #000;
border-collapse: collapse;
color: #666666;
min-width: 500px;
width: 100%;
}
tr
{
border: 1px solid #000;
line-height: 25px;
}
th
{
background-color: #9b9993;
color: #000;
font-size: 13px;
text-align: left;
}
th, td
{
padding-left: 5px;
}
tr:hover
{
background-color: #fff;
}
I currently got my PC as a web host you can view the site with the CSS here:
http://74.71.27.20/d499
Any help would be appreciated.
My master page simply calls container then header and nav and categories and footer.
The best CSS advice I can give if you have div issues is to look into YUI it is JUST css, so don't think it is some crazy new technology but it can be a huge help.
Watch this introductory video about it: http://video.yahoo.com/watch/1373808/4732784
The above video is a little dated but gives a good idea and the web is full of the required resources.
Add a clear:both; as your first div is floated left.

Resources