Daimo B
Member
Registered: 20th Mar 00
User status: Offline
|
Anyone aid me?
Doing a crappy basic simpleton website (about my level ). I've got a navigation bar on the left hand side, and its in html, linked into a .css sheet where it gets its properties.
Now somehow, i've removed a bit of code thats meant my main page has moved left over the top of my navigation page.
I know its not padding-left: as this moves the text in my body content section further inside the box. But I want to move the whole lot, right, so my navigation bar is showing again.
Its not margin-left: I know as that just totally screws up my page.
Quite frankly, looking how simple this page is, and the kinda web sites on the tinternet, is making me think not even to bother really
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
Got a link to it?
Edit - You using DIVs or have you iframes/frames in there? If it's DIVs then check the position property of your main content div (ie: absolute, relative, static etc). Setting it relative and increasing the margin-left should push the main content div away from your nav div.
[Edited on 05-08-2010 by Dom]
|
Daimo B
Member
Registered: 20th Mar 00
User status: Offline
|
Nahhh its still offline.
Yeah using div tags and it was setup ok, but then i fiddled around with some margins etc and i've somehow totally screwed it up.
I'll have a re-nose of my div tags and re-read that section.
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
quote: Originally posted by Daimo B
Nahhh its still offline.
Yeah using div tags and it was setup ok, but then i fiddled around with some margins etc and i've somehow totally screwed it up.
I'll have a re-nose of my div tags and re-read that section.
can you post up the HTML (can remove any sensative text/content)?
But yeah, it's usually the position property and margins that screw a lot of it.
|
Daimo B
Member
Registered: 20th Mar 00
User status: Offline
|
HTML...
<body>
<div id="header">
<h1>DaimoB.com</h1>
<div id="tagline">
<p>Damiens experimental web page, for all things Damien</p>
</div>
</div> <!--End of header div-->
<div id="navigation">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="contact.html">Contact Us</a></li>
<li><a href="gallery.html">Image Gallery</a></li>
</ul>
</div> <!-- end of navigation div -->
<div id="bodycontent">
<h2>Welcome to DaimoB's homepage</h2>
<p>Not really much here at the moment, but hopefully this is a place I can hone some skills, add some junk in, some updates and other random crap.</p>
<p>blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah v blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah</p>
</div>
</body>
And the CSS code for the Bodycontent.
#bodycontent {
position: relative;
width: 50em;
margin-left: 11.5em;
padding-top: 2em;
padding-left: 10em;
padding-right: 3em;
border-top: 3px solid navy;
border-bottom: 3px solid navy;
background: black repeat-y;
}
Yeah yeah, im a complete noob who can't get his head around anything coding I wanna go on a course as I need a holding hand
[Edited on 05-08-2010 by Daimo B]
|
Daimo B
Member
Registered: 20th Mar 00
User status: Offline
|
Got it.
removed Margin-top from the above.
Found...
#navigation, #bodycontent {
top: 12.5em;
height: 526px;
}
So along with using "Relative", and adjusting the margin-left i've sorted the allignment.
What im confused about now is the above.
Both the Bodycontent, and the Navigation bar have been set to 526px, but they appear to be a different length at the bottom of the page?
I really should use Dreamweaver instead of hand coding this, but how else can you learn properly if the PC is doign it all?
|