Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

List trouble.

Featured Replies

Hey guys!

I am having some trouble with a list, it is for some reason adding a (around) 45px padding to the right.

 

I uploaded the design so far here:

http://allister.ch/betaTest/

 

The specific css source code:

#bottomModulesConLeft
{
	float: left;
	height: 350px;
	width: 350px;
}
	#bottomModulesConLeft h3
	{
		font-weight: normal;
		margin-left: 10px;

	}
	#recentImages
	{
	height: 197px;
	width: 350px;
	margin-left: 10px;
	background:url(../images/newimages.jpg);
	}
	.images
	{
		list-style: none;
		display: block;
		width: 320px;
		height: 197px;
	}
	.images li
	{
		height: 70px;
		width: 70px;
		background: #666666;
		float: left;
		margin:0 4px 4px;

	}

 

Thanks for any help :)

Hi There,

 

Add padding: 0px; to .images that will cure it.

 

Many objects have default padding and margin settings that often mess designs up in these niggly ways!

 

I strongly suggest using the basic global reset at the start of your style sheet

 

* {
padding: 0px;
margin: 0px;
}

 

or because this can slow the page's loading time (While the css applies the property to every single element), use Eric Meyer's css reset:

http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/

 

This will get rid of all the default styles and give you a blank canvas to work with. I've found working with css so much easier since I started using it.

  • Author

Thanks for that, looks fine now!

 

I used to use global css reset but stopped for some reason, will remember in the future.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.