corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Stuck on a bit of html/css code


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Stuck on a bit of html/css code
Daimo B
Member

Registered: 20th Mar 00
User status: Offline
5th Aug 10 at 13:30   View User's Profile U2U Member Reply With Quote

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
5th Aug 10 at 13:53   View User's Profile U2U Member Reply With Quote

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
5th Aug 10 at 13:59   View User's Profile U2U Member Reply With Quote

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
5th Aug 10 at 14:01   View User's Profile U2U Member Reply With Quote

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
5th Aug 10 at 14:05   View User's Profile U2U Member Reply With Quote

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
5th Aug 10 at 14:33   View User's Profile U2U Member Reply With Quote

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?

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
my first website iv made........ Icy General Chat 62 2358
12th Mar 05 at 13:00
by foxy lady
 
Webdesign Kerry Geek Day 2 120
20th Jul 06 at 08:51
by Planty02
 
FAO: Webmasters: CSS Bart Geek Day 14 1125
24th Oct 06 at 14:57
by Ian
 
Input on a website please, web designers especially :D drunkenfool Geek Day 56 3016
25th Nov 06 at 19:08
by aPk
 
Need to create HTML for this........ FINISHED PG3 dave17 Geek Day 72 2303
11th Jan 07 at 23:31
by drax
 

Corsa Sport » Message Board » Off Day » Geek Day » Stuck on a bit of html/css code 29 database queries in 0.0061200 seconds