Need Help With Microsoft Publisher
#1
Posted 13 August 2007 - 09:46 PM
#2
Posted 13 August 2007 - 10:51 PM
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).
#3
Posted 14 August 2007 - 12:38 AM
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 }
#4
Posted 14 August 2007 - 12:50 AM
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.
#5
Posted 14 August 2007 - 01:34 AM
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.
#6
Posted 14 August 2007 - 06:53 AM
One number: All sides.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.
Two numbers: Top and bottom, right and left.
Three numbers: Top, right and left, bottom.
Four numbers: Top, right, bottom, left.
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.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.
#7
Posted 14 August 2007 - 11:12 AM
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.
#8
Posted 14 August 2007 - 02:12 PM
I was saying that you couldn't use them and get a liquid layout.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.
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.
#9
Posted 14 August 2007 - 02:22 PM
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.It's probably just Publisher sucking.
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.
#10
Posted 14 August 2007 - 02:58 PM
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.
#11
Posted 14 August 2007 - 04:22 PM
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.
#12
Posted 14 August 2007 - 04:32 PM
#13
Posted 14 August 2007 - 11:11 PM
So if you can't make heads or tails of Publisher's code, that's okay – I can't, and people pay me to.
Edited by Thom, 14 August 2007 - 11:12 PM.
#14
Posted 15 August 2007 - 05:45 PM
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.
#15
Posted 23 August 2007 - 06:59 PM
#16
Posted 23 August 2007 - 08:30 PM
.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.
#17
Posted 24 August 2007 - 03:07 AM
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"?
#18
Posted 24 August 2007 - 11:42 AM
Edited by RAMBO, 24 August 2007 - 11:56 AM.
#19
Posted 24 August 2007 - 03:49 PM
#20
Posted 24 August 2007 - 05:00 PM
body { background: #000; }for black
or
body ( background: url(%image%) }for a gradient where %image% is the gradient's URL.
#21
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.
#22
Posted 24 August 2007 - 10:55 PM
#23
Posted 24 August 2007 - 11:21 PM
The CSS for a background is:
body { background: #000; }for black
orbody ( 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.
#24
Posted 24 August 2007 - 11:29 PM
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).
#25
Posted 25 August 2007 - 02:52 AM
Edited by six-five-two, 25 August 2007 - 02:52 AM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users