Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

SimonUK5

macrumors 6502
Original poster
Nov 26, 2010
476
7
Due to some crazy ass course at school I've had to make a really simple Nav bar in fireworks and then Import it into dreameaver. That was fine i did it and whatever.

But,

I can't Center the nav bar in dreamweaver? I Preview it in Safari and it just shows top left and i need it to show Top Center? And i can't for the life of my work out how to get it there :p


I'm a Web Design Noob! Help me!

ix8h2s.jpg
 
I'm not a Dreamweaver user but if you can access and edit your CSS styling code you can center it fairly easily.

I'm assuming the navbar is an image file (jpg,png?) that you exported from Fireworks. Also assuming you know the width of it in pixels.

HTML would looks something like:

<html>
........
<body>

<div id="navbar"> </div>

</body>
</html>

Then CSS:

#navbar {
width:800px; (whatever width the navbar needs to be or is)
margin: 0 auto; (this sets the navbar's top and bottom margin to 0 and the left and right to auto, which auto centers it in the window.)
}

That's it. Does that make sense?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.