So we are on the 4th or 5th design...and this is how far we have come:
http://riverahotelsouthbeach.com/allie/
I know it needs a little something something...Anyone have suggestions? Flash...images..anything?
Thank you!!!
Allie
Shorts
10-03-2008, 05:44 PM
Would suggest breaking up the menu on the bottom with a long repeating background image and decent padding on top and bottom of the background.
grimmylina
10-03-2008, 05:47 PM
How do I put padding on the top and bottom? What does that do?
Shorts
10-03-2008, 05:56 PM
How do I put padding on the top and bottom? What does that do?
Saying you should have a background image thats about 40 pixels high and goes the full width. Then the menu be vertically aligned in the middle.
Metreon Cascade
10-04-2008, 01:34 AM
Padding the background image would make the background on the menu extend slightly above and below the actual menu items, giving them some breathing room and making them easier to read.
You could simply give them a background color, but that would be too minimalistic and modern. Too few websites use such a classic style. The ornate background that the page has is quite excellent - if you can find another vintage pattern (low-contrast of course), that would fit nicely. Like this:
Metreon Cascade
10-04-2008, 01:45 AM
I just took a look at the source for your page. You will go insane and wind up eating people in a basement somewhere if you try to do this with tables. Your layout barely has any content on it yet, but the table code is running amok already. I could duplicate this layout with two divs and (if I used tables at all) two table cells, and centered paragraphs. As in:
<div 1 for the main content box that has everything in it>
<table>
<tr>
<td>
<img src="your logo goes here">
</td>
<td>
<p>centered paragraph with the 'lorem ipsum' goes here</p>
</td>
</tr>
</table>
<div 2 for the menu items>
<p> one centered paragraph with padding on the top </p>
<p> another centered paragraph with padding on the bottom</p>
</div 2>
</div 1>
Also - if you can find photos of the hotel (or the immediate area, if it's under construction), that might draw attention. But it would be a trick or two to integrate photographs into such a pristine visual milieu as yours.
Shorts
10-04-2008, 02:09 AM
Padding the background image would make the background on the menu extend slightly above and below the actual menu items, giving them some breathing room and making them easier to read.
You could simply give them a background color, but that would be too minimalistic and modern. Too few websites use such a classic style. The ornate background that the page has is quite excellent - if you can find another vintage pattern (low-contrast of course), that would fit nicely. Like this:
Yeah, thats the type of idea I was suggesting.
grimmylina
10-04-2008, 01:21 PM
Thanks!! I know..I am going crazy with the tables. I am actually looking for a tutorial to switch it to complete css.
Those divs confuse me so much....
Metreon Cascade
10-04-2008, 07:04 PM
I'll cook something up for you when I get some free time.
grimmylina
10-05-2008, 07:05 PM
Ok.....I took some initiative and came up with this:
I'm happy....sort of :D. I've been putting this off for a looonnnggg time.
But what's wrong with my menu css? And if someone could check my other css please? I want to make sure it's correct because in Dreamweaver I am seeing some things crossed out :confused: What's that all about?
aj_nsc
10-05-2008, 07:26 PM
On this page: http://riverahotelsouthbeach.com/allie/aboutus.html
Your image is about 300px high yet your content box is only a third of that. I can live with the scrolling content box, but you have so much more room to fill up with content on the side why would you keep it to just about 100px high?
My suggestion: make it the same height as the image, or at least substantially bigger than it is now.
Not a bad design overall, though.
grimmylina
10-05-2008, 07:30 PM
I'm actually trying to convert everything into css:
And get away from the tables.....which everybody seems to hate.
Metreon Cascade
10-05-2008, 09:51 PM
Here you go. I based everything on percentages, so it should scale nicely in any size window or screen. The logo will also scale, but should look pretty good no matter what shape someone's screen is. I put in a ton of comments.
If you'd like to see where a div or table's exact boundaries are, just change the border width. I put zero-pixel borders on a few things (they're marked with comments) for just this purpose.
I still had to use a single-cell table for the 'lorem ipsum' paragraph, because vertical centering is impossible otherwise. But you'll see how little code I had to use, both for the table and for the CSS overall. Took maybe an hour.
Two attachments on this post. The first is a screenshot. The second is a background wallpaper for the links, which should be copied to the same directory as the existing wallpaper. Hope this helps...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Sample with CSS - version 2</title>
<style type="text/css" media="screen">
<!--
body
{
padding: 0;
margin: 0;
background-color: #666;
background-image: url(images/common/pattern.jpg);
color: #000;
text-align: center;
}
#contents
{
/* The new positioning is based on the browser window, so it scales. */
position: fixed; /* fixed relative to the screen - doesn't move, and it
takes its position based on the window instead of another element */
top: 6%; /* I'll try to stick to percentages for layout, for scalability */
left: 8%;
/* To make it appear centered (it isn't), I double the above values and subtract them from 100 to get the sizes. */
height: 88%; /* 100 minus 12 (which is double the value for 'top') */
width: 84%;
padding: 0px; /* remove padding to simplify the process */
background-color: #E8E3BF;
color: #000;
text-align: left;
z-index: 1; /* puts it 'behind' everything else */
}
#logodiv {/* contains the logo */
border: 0px solid blue; /* to see the box, change '0' to '1' */
position: fixed;
top: 6%; /* same as the content box */
left: 8%; /* same as the content box */
width: 41%; /* half of the content box's width, minus 1% as a fudge factor */
height: 60%; /* arbitrarily chosen to leave space in the content box - play with this number */
z-index: 2; /* puts it 'in front' of the content box */
}
img.logopicture { /* This is the new style for the logo image. */
position: absolute; /* positions it based on the containing element */
height: 90%; /* instead of padding, I make it 90% of the box's height and width and divide
the remainder by 2 to get the top and left values - same thing I did with div.contents */
width: 90%;
top: 5%;
left: 5%;
}
#loremdiv {/* contains the 'lorem ipsum' paragraph */
/* I copied this code from #logodiv, then all I did was change 'left' to 'right' so it's positioned from the
right edge of the window */
border: 0px solid green; /* to see the box, change '0' to '1' */
position: fixed;
top: 6%; /* same as the content box */
right: 8%; /* same value as 'left' on #logodiv */
width: 41%; /* half of the content box's width, minus 1% as a fudge factor */
height: 60%; /* arbitrarily chosen to leave space in the content box - play with this number */
z-index: 2; /* puts it 'in front' of the content box */
}
table.loremtable { /* A single-cell table for the 'lorem ipsum' paragraph.
I used this because vertical centering is completely impossible
without tables (until browsers start supporting css vertical-align). */
border: 0px solid blue; /* to see the table, change '0' to '1' */
position: absolute; /* position based on #loremdiv */
/* height, width, top, and right copied from height, width, top, and left from img.logopicture */
height: 90%;
width: 90%;
top: 5%;
right: 5%; /* used right instead of left */
}
#nav{ /* the patterned container for the links */
border: 0px dotted black;
position: fixed;
left: 8%; /* same as #contents */
width: 84%; /* same as #contents */
bottom: 14%; /* This ensures that the links will show up just above the bottom of the content box. */
background-color: #666;
background-image: url(images/common/pattern-faded.jpg);
z-index: 3; /* puts this 'in front' of the content box, the logo, and 'lorem ipsum' */
}
p.navparagraph { /* A centered paragraph that holds all the links. */
font-weight: bold; /* I made the links bold for easier reading. */
text-indent: 0in;
text-align: center;}
span.navlink {
padding: .2in; /* for some breathing room */}
<div id="contents">
<!-- For purposes of the code, the content doesn't have to
actually be inside this div to look like it's inside - everything just sits 'in front' of this box. -->
</div>
<div id="logodiv">
<img class="logopicture" src="riviera_logo_main.jpg" alt="Riviera South Beach">
<!-- I removed height and width from the image - I'll use CSS for that, so I added a class -->
</div>
<div id="loremdiv">
<table class="loremtable">
<tr><td>
<p class="text1">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur wisi mi,
rutrum sit amet, viverra vel, sodales vitae, magna. Donec tempus felis
sit amet eros. Nam urna. Duis vel orci. Mauris placerat elit id mauris.
Nullam sagittis tincidunt dolor. Nunc odio magna, porta eu, ullamcorper
ac, volutpat eget, nunc. Quisque tempus leo at augue. Etiam feugiat
massa in sem. Quisque nec diam. Nunc tempus wisi nec risus. Class
aptent taciti sociosqu ad litora torquent per conubia nostra, per
inceptos hymenaeos. In auctor. Donec imperdiet ante in metus. Curabitur
felis nisl, placerat non, mollis eget, ullamcorper sit amet, metus. In
hac habitasse platea dictumst. Nam interdum urna ut sapien. Nulla
facilisi. Mauris ut velit. Proin non arcu.
</p>
</td></tr>
</table>
</div>
Merde. I just tested it in IE. It works fine in Firefox and Safari. Opera is ignoring the padding on the links, and come to think of it I should have put that on the paragraph instead. IE is ignoring all of the formatting. You should install a script to block IE from the site.
Kidding about that last part (barely). I'll look at other designs of mine where I've run into this problem, and let you know when I find something. Changing position: fixed to position: absolute might do it...
Okay. Fixed and tested. Looks good. Here's the new one:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en"><head>
/* I've put the above code inside a comment so it no longer has any effect. */
/* The new positioning is based on the browser window, so it scales. */
position: absolute; /* fixed relative to the screen - doesn't move, and it
takes its position based on the window instead of another element */
top: 6%; /* I'll try to stick to percentages for layout, for scalability */
left: 8%;
/* To make it appear centered (it isn't), I double the above values and subtract them from 100 to get the sizes. */
height: 88%; /* 100 minus 12 (which is double the value for 'top') */
width: 84%;
padding: 0px; /* remove padding to simplify the process */
background-color: #E8E3BF;
color: #000;
text-align: left;
z-index: 1; /* puts it 'behind' everything else */
}
#logodiv {/* contains the logo */
border: 0px solid blue; /* to see the box, change '0' to '1' */
position: absolute;
top: 6%; /* same as the content box */
left: 8%; /* same as the content box */
width: 41%; /* half of the content box's width, minus 1% as a fudge factor */
height: 60%; /* arbitrarily chosen to leave space in the content box - play with this number */
z-index: 2; /* puts it 'in front' of the content box */
}
#loremdiv {/* contains the 'lorem ipsum' paragraph */
/* I copied this code from #logodiv, then all I did was change 'left' to 'right' so it's positioned from the
right edge of the window */
border: 0px solid green; /* to see the box, change '0' to '1' */
position: absolute;
top: 6%; /* same as the content box */
right: 8%; /* same value as 'left' on #logodiv */
width: 41%; /* half of the content box's width, minus 1% as a fudge factor */
height: 60%; /* arbitrarily chosen to leave space in the content box - play with this number */
z-index: 2; /* puts it 'in front' of the content box */
}
table.loremtable { /* A single-cell table for the 'lorem ipsum' paragraph.
I used this because vertical centering is completely impossible
without tables (until browsers start supporting css vertical-align). */
border: 0px solid blue; /* to see the table, change '0' to '1' */
position: absolute; /* position based on #loremdiv */
/* height, width, top, and right copied from height, width, top, and left from img.logopicture */
height: 90%;
width: 90%;
top: 5%;
right: 5%; /* used right instead of left */
}
img.logopicture { /* This is the new style for the logo image. */
position: absolute; /* positions it based on the containing element */
height: 90%; /* instead of padding, I make it 90% of the box's height and width and divide
the remainder by 2 to get the top and left values - same thing I did with div.contents */
width: 90%;
top: 5%;
left: 5%;
}
#nav{ /* the patterned container for the links */
border: 0px dotted black;
position: absolute;
left: 8%; /* same as #contents */
width: 84%; /* same as #contents */
bottom: 16%; /* This ensures that the links will show up just above the bottom of the content box. */
background-color: #666;
background-image: url(images/common/pattern-faded.jpg);
z-index: 3; /* puts this 'in front' of the content box, the logo, and 'lorem ipsum' */
}
p.navparagraph { /* A centered paragraph that holds all the links. */
font-weight: bold; /* I made the links bold for easier reading. */
text-indent: 0in;
text-align: center;
padding: .2in;}
span.navlink {
padding: .2in; /* for some breathing room */}
<div id="contents">
<!-- For purposes of the code, the content doesn't have to
actually be inside this div to look like it's inside - everything just sits 'in front' of this box. -->
</div>
<div id="logodiv">
<img class="logopicture" src="riviera_logo_main.jpg" alt="Riviera South Beach">
<!-- ##### I removed height and width from the image - I'll use CSS for that, so I added a class -->
</div>
<div id="loremdiv">
<table class="loremtable">
<tr><td>
<p class="text1">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur wisi mi,
rutrum sit amet, viverra vel, sodales vitae, magna. Donec tempus felis
sit amet eros. Nam urna. Duis vel orci. Mauris placerat elit id mauris.
Nullam sagittis tincidunt dolor. Nunc odio magna, porta eu, ullamcorper
ac, volutpat eget, nunc. Quisque tempus leo at augue. Etiam feugiat
massa in sem. Quisque nec diam. Nunc tempus wisi nec risus. Class
aptent taciti sociosqu ad litora torquent per conubia nostra, per
inceptos hymenaeos. In auctor. Donec imperdiet ante in metus. Curabitur
felis nisl, placerat non, mollis eget, ullamcorper sit amet, metus. In
hac habitasse platea dictumst. Nam interdum urna ut sapien. Nulla
facilisi. Mauris ut velit. Proin non arcu.
</p>
</td></tr>
</table>
</div>
Wow :D.....Thank you so much for all the work you did!!! I am just amazed.
Thank you very, very much!!!
grimmylina
10-06-2008, 07:50 AM
What would I do if I wouldn't want it scaling? And just to sit still at one size?
Metreon Cascade
10-06-2008, 10:39 AM
Pick out new top, left, width, and height values for #contents, in pixels, and type them in. And then wherever the positioning of the other elements depends on that (marked in the comments), alter those values based on the new ones for the content box. For instance, if width on #contents is 700px, then the width on #navlinks has to be 700px (so the navigation area will fit cleanly over #contents).
More detailed explanation later...
Metreon Cascade
10-06-2008, 11:31 AM
And just to be clear on what I meant by 'scalable,' a screenshot. This isn't really the reason for scaling - the main reason I did it that way is because of monitors with different aspect ratios.
Metreon Cascade
10-06-2008, 11:32 AM
You can also do sizes in inches, but I've only used inches for margins and text so I'm not sure how it works out.
grimmylina
10-06-2008, 11:58 AM
Hmmm...css is just too confusing.:confused:
I'm ready to give up.....
Metreon Cascade
10-06-2008, 12:05 PM
Just take it a little bit at a time. Any code you don't understand, Google "CSS" and whatever the attribute is (not the value). So if you see "position: absolute" and are puzzled, type "CSS position" (no quotes) in and rummage around. Seriously, I learned most of my CSS from Googling stuff. And I'll be around.
Any other particular questions?
grimmylina
10-06-2008, 12:09 PM
Nope.....but thank you for all your help!!!!!
Metreon Cascade
10-06-2008, 12:10 PM
Also, the 'cascading' in CSS refers to the fact that you can use more than one source for styles. You can have an external .css file (created in Notepad) that the HTML links to in the head. Then anything you put between <style> tags in the HTML file's header will override the .css file. And any style you put directly on an element (such as <p style="text-align: center;"> text </p>) will override both the css in the header and the linked css.
grimmylina
10-06-2008, 12:28 PM
Maybe this time I'll stick to tables......They just seem a lot easier to do deal with.
grimmylina
10-06-2008, 05:01 PM
Ok, I'm back begging for help....
Is there any way I can stop this screen from scrolling so the yellow space at the bottom can't be seen:
Could I ask you something? So this is a site that I found a template for:
http://www.hotelshelley.com/
If you try and pull the bottom corner you don't see any additional white space after the footer. Someone told me it was because on the template they use a background image....
Is there a way to do that here? (I put in what you said...thank you!!)
So I changed everything to pixels on your sample (because I know in the end css will be better even though I'll end up with more grey hairs then when I began):
(*) is the universal selector. It applies to everything.
The above code specifies that everything should have a padding and margin of zero. This will stay in effect until a style for a specific item says otherwise. So by default everything has zero margin and padding, but you can make exceptions for each element in its own style.
For the 'Lorem Ipsum' paragraph, give the table a border of 1px (I marked where you do that with a comment). Then remove the markup (the <div> tags) for #loremdiv. In fact I might have wasted some code even putting that thing in there. Copy the height, width, right, and top values for #loremdiv to the table's stylesheet (remember to remove the old values).
Shorts
10-07-2008, 04:25 PM
Its because there are tabs and line breaks in your <p class="text1">
Why don't things like changing the position to fixed work?
Metreon Cascade
10-08-2008, 01:15 AM
Position: fixed is interpreted poorly by Internet Explorer a lot of the time, but that's not the problem with the paragraph. The positioning still says it's supposed to be a certain distance from the right side. Since the right side is always getting farther or closer to the left side depending on the shape of the window and the size of the screen, the paragraph needs to be positioned from the left side.
It would be okay if you were using percentages, but with pixels everything basically needs to be based on the top left corner. Here's a new style. I took out some comments that didn't apply anymore, and the styles I changed are marked with /* #####*/ so you can pick them out..
table.loremtable { /* A single-cell table for the 'lorem ipsum' paragraph.
I used this because vertical centering is completely impossible
without tables (until browsers start supporting css vertical-align). */
border: 0px solid blue; /* to see the table, change '0' to '1' */
position: absolute; /* ##### - this works better in IE than 'fixed' does */
height: 250px;
width: 400px;
top: 75px;
left: 580px; /* ##### */
z-index: 2; /* puts it 'in front' of the content box */
}
grimmylina
10-08-2008, 07:47 AM
How did you learn all of this? You are so smart.....:D
Should this be as easy for me to learn as html?
Metreon Cascade
10-09-2008, 03:24 AM
Well, different browsers interpret CSS differently. Whatever issues you've run into before with IE and HTML, you'll find many MANY more with IE. But reams and reams of information have been written about these bugs and various workarounds. I'm trying to copy all of my web design bookmarks so I can add them to a special links page, but I've been short on time and there's something I'm missing about how it's done.
But seriously, I own one book on HTML (and it has a brief chapter on CSS). Mostly I learned from Googling.
A few sites to start with:
http://www.w3schools.com/css/ - training from the W3C
quirksmode.org (http://quirksmode.org) - lists browser quirks
alistapart.com (http://alistapart.com) - general web design blog/resource
http://www.w3.org/Style/CSS/ - the W3C's official CSS page
Other goodies:
http://www.somacon.com/p142.php
- a chart of CSS color codes. There are lots of these out there, this just happens to be a good one.
http://www.angelfire.com/al4/rcollins/style/fonts.html - a font guide for webmasters, which lists the most common fonts and what computers they're installed on. I think it missed one or two (isn't Papyrus standard?), but it lists some you might not think of.
http://www.webdevout.net/browser-support - a point-by-point listing of which browsers support which codes.
And seriously, type 'CSS' into Google. But in all fairness, I've got an IQ of 151. So I'm totally cheating.
grimmylina
10-10-2008, 09:35 AM
Thanks!!!! : )
webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved.