6 replies [Last post]
nlstart
nlstart's picture
User offline. Last seen 28 weeks 3 days ago. Offline
rank Regular
Regular
Timezone: GMT+1
Joined: 2009-11-20
Posts: 11
Points: 14

My CSS layout shows perfectly on my 1024px wide screen, but shifts unexpectedly when the screen width is 1280px...
I'm staring for days at my CSS code now, but cannot seem to find the cause of it. You can see for yourselves the problem in action: http://74.52.160.129/~temp/.

Thanks in advance for your assistance!

CupidsToejam
CupidsToejam's picture
User offline. Last seen 17 weeks 22 hours ago. Offline
rank Guru
Guru
Timezone: GMT-6
Joined: 2008-08-15
Posts: 2634
Points: 1552

1. you might want to use a

1. you might want to use a container, or wrapper. OR give everything a width of 990px, and use margin: 0 auto; to keep everything centered.

2. your menu should be a UL list.


First basic few steps in building a webpage
1. Gather and collect content.
2. Organize the content into meaningful semantic valid HTML
3. Design the prototype
4. Style using CSS

http://www.pixelbehavior.com

nlstart
nlstart's picture
User offline. Last seen 28 weeks 3 days ago. Offline
rank Regular
Regular
Timezone: GMT+1
Joined: 2009-11-20
Posts: 11
Points: 14

I do use a wrapper: <div

I do use a wrapper:

<div id='pagewidth' >
	<div id='wrapper' class='clearfix' > 
		<div id='twocols' class='clearfix'> 
			<div id='maincol' >
				Main Content Column 
 
			</div>
			<div id='rightcol' > &nbsp; <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
		</div> 
 
	</div>
</div>

CupidsToejam
CupidsToejam's picture
User offline. Last seen 17 weeks 22 hours ago. Offline
rank Guru
Guru
Timezone: GMT-6
Joined: 2008-08-15
Posts: 2634
Points: 1552

no, one that contains

no, one that contains everything.


First basic few steps in building a webpage
1. Gather and collect content.
2. Organize the content into meaningful semantic valid HTML
3. Design the prototype
4. Style using CSS

http://www.pixelbehavior.com

nlstart
nlstart's picture
User offline. Last seen 28 weeks 3 days ago. Offline
rank Regular
Regular
Timezone: GMT+1
Joined: 2009-11-20
Posts: 11
Points: 14

Excellent; I have created a

Excellent; I have created a new container in my style.css; and I used it in such a way that it contains my whole website.

#main_container
{
	width: 990px;
	margin: 0 auto;
}

Seems to be working fine now; thanks for that!

Could you explain into more detail what you meant with your remark "your menu should be a UL list." because I don't understand what you are trying to say with that.

CupidsToejam
CupidsToejam's picture
User offline. Last seen 17 weeks 22 hours ago. Offline
rank Guru
Guru
Timezone: GMT-6
Joined: 2008-08-15
Posts: 2634
Points: 1552

UL lists are much more easier

UL lists are much more easier to style and work with then a bunch of link tags, and its more semantic! check out the site below..

http://css.maxdesign.com.au/listamatic/

http://www.w3.org/TR/html401/struct/lists.html


First basic few steps in building a webpage
1. Gather and collect content.
2. Organize the content into meaningful semantic valid HTML
3. Design the prototype
4. Style using CSS

http://www.pixelbehavior.com

nlstart
nlstart's picture
User offline. Last seen 28 weeks 3 days ago. Offline
rank Regular
Regular
Timezone: GMT+1
Joined: 2009-11-20
Posts: 11
Points: 14

Thanks for the links; the

Thanks for the links; the menu links in my example are generated by my CMS, but I will have a look at that later... Thanks again! Smile