Jump to content


Photo

Need Help With Microsoft Publisher


27 replies to this topic

#1 six-five-two

six-five-two

    Member

  • Members
  • 752 posts
  • Location:Vancouver, B.C.

Posted 13 August 2007 - 09:46 PM

Well I am having some problems in Microsoft Publisher. I am basically making a website from scratch but whenever I preview the site (or save as .html), it's always on the left side. I want it to be in the middle. Or better yet, could I make it so that the website is full sized on all computer resolutions?
  • 0

#2 Rambo

Rambo

    Fear the Robble...

  • Members
  • 1,807 posts
  • Location:Allentown, PA

Posted 13 August 2007 - 10:51 PM

So, you want all the content to be centered on the website?

I'm not familiar with Publisher, but if you can't edit HTML files in it, just open it in Notepad and insert:
<div align="center">
immediately after the <body> tag and
</div>
immediately before the </body> tag.


As for making the website the size of the resolution - you really can't(or, shouldn't at least) stretch it(maybe if you have an image background you can tile it) to fit the screen unless the content will fill the entire page. I'm not really sure what you're looking to do there, but if you want to give me some more info, I can help you out. Send me a PM, AIM IM, or MSN IM(PM me for MSN address).
  • 0

#3 Thom

Thom

    Member

  • Members
  • 759 posts
  • Location:SUNY Buffalo

Posted 14 August 2007 - 12:38 AM

I hate to have to say it, but Microsoft Publisher is a terrible environment for making a website. The only good way is to learn HTML. There's no substitute for reading the specification, but there are some halfway-decent tutorials. It's not hard at all – it's not even, technically, programming.

For this particular case, RAMBO's advice should work, or you can replace <div align="center">…</div> with <center>…</center>, but I can't really recommend it. The proper way to center a web page is to add the following to your stylesheet:

body {
  width: (your page's width);
  margin: 0 auto
}

  • 0

#4 Rambo

Rambo

    Fear the Robble...

  • Members
  • 1,807 posts
  • Location:Allentown, PA

Posted 14 August 2007 - 12:50 AM

Good point on the CSS, but(no offense six), I doubt he has the know-how to be coding Sheets if he doesn't know how to center in HTML. However, I could be wrong on that.

Just a couple notes on the CSS usage -
width can be expressed two ways(there are more, but really no point in learning them IMO) - percent(liquid) and px(fixed) - percent is my personal choice, as it is more 'user-friendly'.

margin can be expressed as a single number(such as 0 in the example) or multiple numbers(one for each side of the page) - eg. 20px 0 40px 20px would yield a 20px margin on top, none on the right, 40px on bottom, and 20px on the left. I think that's right, but as I said, I'm really tired - it might be ordered a bit differently, I usually end up fiddling with my numbers for a good 5 minutes anyway.

Edit: For single numbers in margin, it will use the same amount around all sides.
You'll need to insert CSS in the <head> section of your HTML document. Look at the links Thom provided for more info.

Edited by RAMBO, 14 August 2007 - 01:49 AM.

  • 0

#5 six-five-two

six-five-two

    Member

  • Members
  • 752 posts
  • Location:Vancouver, B.C.

Posted 14 August 2007 - 01:34 AM

Well I know a tad of HTML but I found it was too much of a pain in the ass to make a decent looking website. I'll try your suggestions and tell y'all if anything works..

EDIT: Hmm... for one thing, there is no <body> when I try looking for it (so Rambo's doesn't work, I tried Thoms suggestion (of course replacing page width with pixels).

And does anyone know how to make the page like the one I made with a web maker online (check link in sig)? The whole thing stretches to fit the screen but when I use a smaller resolution, it just resizes everything to fit the screen.

Edited by six-five-two, 14 August 2007 - 02:15 AM.

  • 0

#6 Thom

Thom

    Member

  • Members
  • 759 posts
  • Location:SUNY Buffalo

Posted 14 August 2007 - 06:53 AM

margin can be expressed as a single number(such as 0 in the example) or multiple numbers(one for each side of the page) - eg. 20px 0 40px 20px would yield a 20px margin on top, none on the right, 40px on bottom, and 20px on the left. I think that's right, but as I said, I'm really tired - it might be ordered a bit differently, I usually end up fiddling with my numbers for a good 5 minutes anyway.

One number: All sides.
Two numbers: Top and bottom, right and left.
Three numbers: Top, right and left, bottom.
Four numbers: Top, right, bottom, left.

And does anyone know how to make the page like the one I made with a web maker online (check link in sig)? The whole thing stretches to fit the screen but when I use a smaller resolution, it just resizes everything to fit the screen.

All of the widths are specified in percentages, not pixels. Percentage widths are relative to the available space, so if the width of your top-level element is 100%, it will fill the whole screen horizontally.
  • 0

#7 Rambo

Rambo

    Fear the Robble...

  • Members
  • 1,807 posts
  • Location:Allentown, PA

Posted 14 August 2007 - 11:12 AM

Right, I forgot some idiot decided to make it counter-clockwise...

What do you mean you can't use px widths? I've used them before - it's a fixed layout. I dislike using them, but it can be done.


six - Can you host/send me the HTML file? I don't know of any way to have an HTML file that doesn't have <body></body> tags.

Resizing for different resolutions will happen when expressing width as a percentage. So, like with webmaker, your pages will fill the whole screen if you have "width: 100%;" in the CSS body tag.
  • 0

#8 Thom

Thom

    Member

  • Members
  • 759 posts
  • Location:SUNY Buffalo

Posted 14 August 2007 - 02:12 PM

What do you mean you can't use px widths? I've used them before - it's a fixed layout. I dislike using them, but it can be done.

I was saying that you couldn't use them and get a liquid layout.

Also, that is clockwise, not counter-clockwise.

And not having a body tag is DEFINITELY high up on the weird scale. It's probably just Publisher sucking.
  • 0

#9 Carbon

Carbon

    Contriberator

  • Moderators
  • 1,893 posts
  • Location:Milwaukee, WI
  • State:Wisconsin
  • Country:United States

Posted 14 August 2007 - 02:22 PM

It's probably just Publisher sucking.

Publisher sucks when you use it for it's primary purpose, so I can only imagine what it'd be like for web pages. Microsoft products have never exactly been known for producing clean HTML.

I'll put in a plug for Nvu, an open source web page design program. You'll probably have a better time if you use something that was intended for producing web content in the first place.
  • 0
Hello. I am Indigo of the Rainbow Clan. You Nerfed my father. Prepare to die.

#10 six-five-two

six-five-two

    Member

  • Members
  • 752 posts
  • Location:Vancouver, B.C.

Posted 14 August 2007 - 02:58 PM

Thom and RAMBO, I have no fucking idea what your talking about liquid and counterclockwise stuff. I think there may be a body tag in the HTML but it's not at the exact start and it has some stuff attched to it (<body something something>). RAR file below.

Carbon, I'll try out Nvu today.

Since the file was mega small and I felt like posting a shit load of links:
http://fileho.com/do...ebsite.rar.html
http://www.mediafire.com/?3x3kelxgdtd
http://rapidshare.co...ebsite.rar.html

Thanks for all your help so far.
  • 0

#11 Rambo

Rambo

    Fear the Robble...

  • Members
  • 1,807 posts
  • Location:Allentown, PA

Posted 14 August 2007 - 04:22 PM

Thom - Not sure why I said counter-clockwise, wasn't thinking straight.

Carbon - I don't mind using Visual Studio for HTML coding, but there really isn't any pressing need to.

six - Ignore the counter-clockwise remarks, that was just me not thinking straight.

I looked at that HTML file you hosted and I honestly have no clue what is going on. I'd definately reccomend scrapping Publisher.
  • 0

#12 six-five-two

six-five-two

    Member

  • Members
  • 752 posts
  • Location:Vancouver, B.C.

Posted 14 August 2007 - 04:32 PM

I thought so. I know a tad bit of knowledge with HTML but when I opened it up I was really confused. I'm going to try Nvu now... hopefully it's cleaner like what Carbon said.
  • 0

#13 Thom

Thom

    Member

  • Members
  • 759 posts
  • Location:SUNY Buffalo

Posted 14 August 2007 - 11:11 PM

Honestly, programs like Publisher make HTML seem MUCH harder and more complicated than it really is. Hand-crafted code can be a pleasure to read, comprehensible even to non-technophiles. It's not you – web design is my job and all the time I'm confronted with machine-generated code that even I can't unravel. (The technical terms are Big Ball of Mud and Amorphous Blob of Human Insensitivity. Who ever said that programmers don't have a sense of humor?) Usually, I find it easier to start over and re-write a age completely from scratch than try to salvage code like that which Publisher/Word/FrontPage excretes.

So if you can't make heads or tails of Publisher's code, that's okay – I can't, and people pay me to. :P

Edited by Thom, 14 August 2007 - 11:12 PM.

  • 0

#14 six-five-two

six-five-two

    Member

  • Members
  • 752 posts
  • Location:Vancouver, B.C.

Posted 15 August 2007 - 05:45 PM

Well I tried using Nvu with Rambos original <div> codes and it centered it... but I kinda changed my mind and I want it to fit the whole screen under any resolution.

EDIT: Damn Nvu is such a pain, it doesnt allow to add navigation bars unless I code it... arrgh!

Edited by six-five-two, 15 August 2007 - 05:56 PM.

  • 0

#15 six-five-two

six-five-two

    Member

  • Members
  • 752 posts
  • Location:Vancouver, B.C.

Posted 23 August 2007 - 06:59 PM

Err could someone help? I am using Dreamweaver now aswell...
  • 0

#16 Rambo

Rambo

    Fear the Robble...

  • Members
  • 1,807 posts
  • Location:Allentown, PA

Posted 23 August 2007 - 08:30 PM

Try the following:
.body {
width: 100%
}
within a CSS document. Then in your HTML document, use:
<div class="body">
and
</div>
before and after all the code within <body></body>. That should work.
  • 0

#17 taita cakes

taita cakes

    Member

  • Members
  • 943 posts

Posted 24 August 2007 - 03:07 AM

Are you handicapped or something Rambo?

If you use a CSS document you just need to remove the period, ".", from body, and it will automatically apply itself to the body tags.

body {
   width:100%;
}
And if you were in fact trying to write a style for the <div>, you should teach good code practises by:
- First of all, closing the argument with a semicolon.
- Secondly, using unique class names. Body being a somewhat retarded choice. Try ".content" or ".main"?
  • 0
Oh Kentucky, you are so fuggin awesome...

#18 Rambo

Rambo

    Fear the Robble...

  • Members
  • 1,807 posts
  • Location:Allentown, PA

Posted 24 August 2007 - 11:42 AM

Thom had suggested that before and seeing as he said it didn't work(while that makes no sense, I can only assume that he didn't understand the directions), I figured he might try something else. A semicolon isn't required if there is only one element to the best of my knowledge. Everyone codes their own way, what's the difference what class name I use?

Edited by RAMBO, 24 August 2007 - 11:56 AM.

  • 0

#19 six-five-two

six-five-two

    Member

  • Members
  • 752 posts
  • Location:Vancouver, B.C.

Posted 24 August 2007 - 03:49 PM

Well I got the text to center with Rambo's <div> tags and I found out how to center the backround image aswell. So everything is centered, but now I have one final question: Since the page is centered the sides are white. Is there any way I can make it so that the sides are black instead of white or has a gradient, etc.?
  • 0

#20 Rambo

Rambo

    Fear the Robble...

  • Members
  • 1,807 posts
  • Location:Allentown, PA

Posted 24 August 2007 - 05:00 PM

The CSS for a background is:
body {
background: #000;
}
for black
or
body (
background: url(%image%)
}
for a gradient where %image% is the gradient's URL.
  • 0

#21 taita cakes

taita cakes

    Member

  • Members
  • 943 posts

Posted 24 August 2007 - 08:24 PM

Thom had suggested that before and seeing as he said it didn't work(while that makes no sense, I can only assume that he didn't understand the directions), I figured he might try something else. A semicolon isn't required if there is only one element to the best of my knowledge. Everyone codes their own way, what's the difference what class name I use?


Because we're talking good coding practices.

If you're teaching someone else CSS they're not going to put semi-colons on any other code they write because they don't understand the importance of it, because they didn't see it in your example.
I know this because that was one of my problems when I first taught myself CSS. Didn't use a single semi-colon...

As for class names, for debugging and stuff, if you've written a hectic, 500 lines style sheet with both selectors "body" and ".body" and throw in stuff like "h1" and ".h1" for good measure, how is this not going to confuse you?
It's just a terrible coding style.

Edited by taita_cakes, 24 August 2007 - 08:26 PM.

  • 0
Oh Kentucky, you are so fuggin awesome...

#22 Thom

Thom

    Member

  • Members
  • 759 posts
  • Location:SUNY Buffalo

Posted 24 August 2007 - 10:55 PM

While I agree with you, taita_cakes, about best practices, I think that they're out the window anyway if you're using a WYSIWG editor.
  • 0

#23 six-five-two

six-five-two

    Member

  • Members
  • 752 posts
  • Location:Vancouver, B.C.

Posted 24 August 2007 - 11:21 PM

The CSS for a background is:

body {
background: #000;
}
for black
or
body (
background: url(%image%)
}
for a gradient where %image% is the gradient's URL.


Okay I tried the first one with just a plain colour, that worked. But when I tried the URL one it didn't work. Infact, it god rid of my current backround!

Edited by six-five-two, 24 August 2007 - 11:26 PM.

  • 0

#24 Rambo

Rambo

    Fear the Robble...

  • Members
  • 1,807 posts
  • Location:Allentown, PA

Posted 24 August 2007 - 11:29 PM

Chances are, he's not having a lot of CSS. I agree with you, it's not the best, but as I said, something happened with the WYSIWYG editor that messed up the style sheet use of the body sector, so I figured it was worth a shot.

Yes, you need the () around the url. You can use an absolute URL(such as the one you asked about) or a relative URL - a path the uses the current file as the base - if the CSS file is in the same directory as the gradient, just use (sidEffeminateture.jpg).
  • 0

#25 six-five-two

six-five-two

    Member

  • Members
  • 752 posts
  • Location:Vancouver, B.C.

Posted 25 August 2007 - 02:52 AM

Okay updated that post above you, Rambo. (New question)

Edited by six-five-two, 25 August 2007 - 02:52 AM.

  • 0


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users