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.

Layout Problems

Featured Replies

Ok here goes I, Have been designing a new design for a client of mine for ages, they choose one so everything is cool.

Now here is the problem My css is only effecting things which are at the top and nothing below it which is strange anyway here is the code

 

Here is the HTML

 

<!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="style.css"rel="stylesheet" type="text/css" />

<title>Home</title>
</head>


And here is my CSS


<body>



<div id="container">


<div id="top">
<img src="Logos/Croydon.jpg" alt="Croydon life logo"> 
</div>

<div id="nav">

</div>


<div id="sidebar">

</div>



</div><!-- end of container -->



<div id="footer">
<img src="images/footer.jpg"
</div>


</body>
</html>

 

 

 

And here is MY CSS

 

body
{
font-family: Arial, Helvetica,Verdana,Georgia;
background-color: #9c000e;
};

#sidebar
{
width: 250px;
height: 800px;
background-color: #000;

};


#nav
{
width: 1250px;
height: 50px;
background-color: #000;

};



#top
{
margin: 0px 0px 0px 50px;
background-color: yellow;
width: 900px;
height: 100px;
};



#container
{
margin: 0px auto;
width: 800px;
height: 800px;
background-color: blue;
};

 

I do not know what I am doing wrong, I am not a novice to css or html just something I am missing but cant find what grrrr

 

p.s at the min all it is showing is the logo Croydon Life and the Nav which is a black bar but no side bar, top or container

 

 

Help is needed thank you

Hi there,

 

Is there a reason for the extra semi-colon after each closing curly bracket? If you take them away your other divs become visible. I don't know if that was what you meant? Good luck anyhow :)

 

Kirsty

  • Author
Hi there,

 

Is there a reason for the extra semi-colon after each closing curly bracket? If you take them away your other divs become visible. I don't know if that was what you meant? Good luck anyhow :)

 

Kirsty

 

 

THANK YOU SO MUCH :)

 

its all working now thank you again silly dwayne

The tiniest mistakes can mess up the CSS. I have run into similar issues.. no semi-colon, too many semi-colons, misspelled div ids... they can be a major pain. So if you ever run into issues, sometimes the first place to look is at the semi-colons and the spelling.

Yeah that's usually it - and it goes so spectacularly wrong too .. :)

 

Also slapping borders on everything, that always helps

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.