Hello, im new and just started learning to write html and css and I need some help.
I want to set a width for my page. like the home page for sitepoint, there is a width set. How do I do that? I did something like this but its not working.
#siteContent { /* trying to set width*/
margin: 0 auto;
width: 500px;
}
I started putting pictures and a navigation bar, but the only way I know how to position them is with position: absolute. I read somewhere that position absolute is a bad way of designing website and it will cause problem later on when updating a website. So what is another method that I can use to position my contents?
<div id=“siteContent”> <!-- Start of siteContent –>
<div id=“navigation”> <!-- Start of navigation –>
<ul id=“navLink”>
<li id=“firstNavItem”><a href=“homepage.html”>Home</a></li>
<li><a href=“about_us.html”>About Us</a></li>
<li><a href=“forums.html”>Forums</a></li>
<li></li>
</ul>
</div> <!-- End of navigation –>
<div id="logo"> <!-- Start of logo -->
<img src="logo.png" alt=""/>
</div> <!-- End of logo -->
<h4 class="slogan">
</h4>
<div id="newsPost"> <!-- Start of newsPost -->
<h3>News</h3>
</div> <!-- End of newsPost -->
<div id="latesPost"> <!-- Start of latestPost -->
<h3>Latest Post</h3>
</div> <!-- End of latestPost -->
</div> <!-- End of siteContent -->
that the html want the css?
edit: I was able to put everything in the area with float =). If there’s another method or better one, please let me know. Thanks a lot for the help.
Hi … after a put img and make ur table sure in design .then checked the code might be extra spaces in spaces u were not remove ,may be thats why u design size not set as u want.
It’s either Engerish, Fluff or bad advice since it doesn’t relate to the original question as it doesn’t use tables. I am nearly tempted to Flag the post #9.