n-line images - Post ID 165645

User 1964159 Photo


Registered User
156 posts

Hi, my first attempt with a new site, using HTML5 and CSS3. I plan a secondary navigation at the bottom of the page, using a set of small images.
By the way, the main navigation was done with CC Flash Menu Builder.
If I call the additional links <nav></nav> it may interfere with my other nav on my style sheet:
nav {
margin-top: 20px;
padding-left: 180px;
}

Should I call the element "<nav1> or something, or article, section or one of the other new boys?
I need to create some CSS to display in-line, padding, margins, maybe drop-shadow etc.
What say you lovely people?
Tony
User 122279 Photo


Senior Advisor
14,649 posts
Online Now

Hi,

If you use a name like <nav1> you need to call it <div id="nav1">

I'm just setting up a site myself using html5, and there is a problem with some older browsers when using the new named tags like <nav>, <head>, <article> etc. I have had to stick with the <div id.... version.

Regarding your bottom nav bar, are you going to use a list to display the various menu items? You can take a look at my work in progress (with no working links yet): www.johnsflats.com/new and see how I have done it.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 562592 Photo


Registered User
2,038 posts

Yes, just to add a little, you may need to still use some classes so that the navigation can degrade gracefully for older browsers.

For example,

nav.top
nav.bottom

then you would set the list for display:inline;
The philosopher has not done philosophy until he has acted upon the mere conviction of his idea; for proof of the theory is in the act, not the idea.

My Web Development Company: http://www.innovatewebdevelopment.com (Created with Coffee Cup Software).

My Personal Website: http://www.EricSEnglish.com

User 1964159 Photo


Registered User
156 posts

I got the 'effect' I needed doing this:
<div id="boards">

<a href="about.html"><img src="Images/board_about.png" class="about" width="140" height="196" alt="chalk board image link, Read ABOUT US" title="Link to About us" border="0" /></a>
<a href="drink.html"><img src="Images/board_ale.png" class="drink" width="140" height="195" alt="chalk board image link, REAL ALE link" title="Link, find out about our selection of drinks" border="0" /></a>
<a href="food.html"><img src="Images/board_food.png" class="food" width="140" height="195" alt="Chalk board image link, FOOD" title="Link to see what we can offer from our menu" border="0" /></a>
<a href="about.html"><img src="Images/board_function.png" class="function" width="140" height="196" alt="Chalk board image link, to read about events and function bookings" title="Link, Need to book a function? Learn about events." border="0" /></a>
<a href="contact.html"><img src="Images/board_intouch.png" class="contact" width="140" height="196" alt="Chalk board image link, GET IN TOUCH" title="Contact your hosts" border="0" /></a>
<a href="about.html"><img src="Images/board_music.png" class="music" width="140" height="196" alt="Chalk board image link, LIVE MUSIC, QUIZES etc." title="Find out about events at the Thatchers" border="0" /></a>
</div> <!--end boards div-->
<hr width="100%" size="3" color="#008000" />

and the CSS:
#boards {
margin-left: 57px;
margin-top: -25px;
margin-bottom: 50px;
}
.about {
margin-right: 20px;
box-shadow: 10px 10px 15px #000;
-webkit-box-shadow: 10px 10px 15px #000;
-moz-box-shadow: 10px 10px 15px #000;
}
.drink{
margin-right: 20px;
box-shadow: 10px 10px 15px #000;
-webkit-box-shadow: 10px 10px 15px #000;
-moz-box-shadow: 10px 10px 15px #000;
}
.food {
margin-right: 20px;
box-shadow: 10px 10px 15px #000;
-webkit-box-shadow: 10px 10px 15px #000;
-moz-box-shadow: 10px 10px 15px #000;
}
.function {
margin-right: 20px;
box-shadow: 10px 10px 15px #000;
-webkit-box-shadow: 10px 10px 15px #000;
-moz-box-shadow: 10px 10px 15px #000;
}
.contact {
margin-right: 20px;
box-shadow: 10px 10px 15px #000;
-webkit-box-shadow: 10px 10px 15px #000;
-moz-box-shadow: 10px 10px 15px #000;
}
.music {
margin-right: 20px;
box-shadow: 10px 10px 15px #000;
-webkit-box-shadow: 10px 10px 15px #000;
-moz-box-shadow: 10px 10px 15px #000;
}

This has achieved an in-line row of "PUB CHALK BOARDS" image links, complete with drop-shadows. But I accept it is not semantically correct, and may not be validated. For a start, there is not a <nav></nav> tag in sight. So, I am probably all very wrong.
User 122279 Photo


Senior Advisor
14,649 posts
Online Now

Hi again,

It looks ok to me, maybe the drop shadow should be made a bit smaller, but that is just my personal opinion.

Your code will validate if you move the parameters for the hr to the css file and makes it into a class.
Then you also need to take out the 'border="0" ' from all the images.
Another thing is that CC's 'created' metatag will never validate. If you want to have the time and date included, stick it in with the 'generator' tag.

Oh, and you are not being forced to use a <nav> tag ;)
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 1964159 Photo


Registered User
156 posts

Thank you Inger and 'Philosopher' - most helpful I will attend to the points in the posts (final).
The one that puzzles me is the <hr>:
<hr width="100%" size="3" color="#008000" /> I use the "HR" button in CC tools and never think about it.
Do I -
<hr class="hrundernav"> />
and in CSS
.hrundernav {
width: 1100px;
size: 3px;
color: #008000;
}
Tony
User 122279 Photo


Senior Advisor
14,649 posts
Online Now

Yeah, that should work :)
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.