Jump to content



Photo

SOLVED [css/xhtml] Div alignment out by a few pixels

css xhtml html

  • Please log in to reply
2 replies to this topic

#1 sean.ferguson

sean.ferguson

    Anonymous

  • Joined: 25-June 05
  • Location: Scotland
  • OS: GNU/Linux

Posted 15 May 2013 - 18:18

Im having a little bother with a page im trying to write. Im not the greatest with creating websites but this small flaw is irritating me.

Have a look at this page please, there are four sections (header, navigation, main, footer). If you look at the length of the navigation and footer sections they are a few pixels longer than the header and main sections. I'l leave you to just view source the page to view the xhtml and the css is found here.

Any help with this would be greatly appreciated.

Thanks :)

EDIT: I literally spent hours on this last night and I have now managed to fix the areas in question. Sorry for the wasted topic, please lock/close do what you wish with me :D


#2 +Seahorsepip

Seahorsepip

    http://seapip.com

  • Tech Issues Solved: 17
  • Joined: 23-January 11
  • Location: Netherlands
  • OS: Windows 8.1 Pro
  • Phone: Nexus 5

Posted 16 May 2013 - 10:33

Use atleast a basic css reset :rofl:

html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-size: 100%;
	vertical-align: baseline;
	background: transparent;
}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
    display: block;
}

And your html layout is a mess, don't use tables for your header and use h1 for your header text, otherwise you won't end up on the first google results page :p

I can write this layout quickly in html5 if you want ^^

#3 +Seahorsepip

Seahorsepip

    http://seapip.com

  • Tech Issues Solved: 17
  • Joined: 23-January 11
  • Location: Netherlands
  • OS: Windows 8.1 Pro
  • Phone: Nexus 5

Posted 16 May 2013 - 12:41

Oh and if you need some help with using css on layouts: http://learnlayout.com/



Click here to login or here to register to remove this ad, it's free!