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.

Beginner with some problems

Featured Replies

Hey guys im new here, it looks like a really nice forum so i signed up :). Ive been maintaining a website for a while now but only just started to use divs and ccs properly. This is the site at the moment. Its probably gonna look really ugly to all you pros but im not really good at coding (although i understand it a bit) so i use design mode in dreamweaver.

 

Website

 

There are a few problems I need help with, probably really obvious to you though. Firstly, the flash add above the top right add isnt loading, and i dont know why. Second, I want to center the whole site so it works in different resolutions, but i have many div layers, so i dont know how to center them all, I heard something about a wrapper div or something? How do i make one of them?

 

Thirdly, on the 'Competitions' page, the images arent lined up at the top even though its in a table and ive set the cell properties vertical alignment to 'top'. Lastly, on most pages but probably most noticable on the 'Spa Hotels' page, look at the gap between '5 of the best' and the image below it. Now look at the design view in dreamweaver [here]. How do i make that gap smaller?

 

Thanks for any replies guys, as i said im pretty new to all this so go easy :D. Also, any obvious mistakes ive made, point out and that will help too.

 

Thanks again :D.

well I can help with the centering part

 

in your html insert

<body>
<div id="wrapper">

...all your content

</div>
</body>

 

In your css insert all this, but replace the width for your actual layout width in pixels

#wrapper {
margin: 0 auto;
width: 800px;
}

Also putting in the css :

 

body : text-align:center;

 

this takes care of centering the wrapper in IE.

 

So you have that for IE and the margin:auto for other browsers.

You don't always need that though.. I have a layout that centres in IE6/7 using only the wrapper method

  • Author

Thanks for the replies guys, ill try that out asap. Any ideas on the other stuff?

ahhh welcome to the wonderful world of CSS, I sure you'll like it. As for centering it..

 

you want to wrap your whole site in a container, sooo..

 

<html>
<body>
<div id="container">
Rest of code yada yada yada
</div>
<body>
</html>

 

now style the container with css so....

 

#container {
margin:10px auto; 
width:720px; or
width:100% or 80% etc.
}

 

 

The auto take the whole container and positions it perfectly in the middle of the page. if you use the pixel width it makes your site fixed but the percent width makes it fluid so it is always the same size no matter what your moniter res is. I no they already told you this I just wanted to explain how it works to you.

 

and btw. dont rely on the dreamweaver design view its not near perfect and also try using css to align the images that are messed up instead of a table, you can use the float property for this, look at www.pixel2life.com for some good CSS Tuts. hope this explained it a little better

I tried having a look at your competition page, but I couldn't work anything out. It's very hard to understand what's going on when the layout if embedded in the HTML like that.

 

One thing I noticed is that you use the same id for multiple elements. Ids should be unique. The class attribute should be used instead when you find yourself using the same id multiple times.

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.