Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 15, 2008, 05:42 PM   #1
macjakob
macrumors newbie
 
Join Date: Feb 2006
Trouble with styling php elements

Hi,

I'm having trouble styling some elements on my site that I've begun making:

http://www.jkholtmann.dk/ny/

at the top you see the navigation bar, which should be a horizontal list.
The index.php just pulls content from the other pages (linked to in the nav bar) and displays them in the content area.

__________________________________
My css looks like this:

body {
background-color: #e9e6d6;
margin: 0; padding: 0; border: 0;}

.content {
margin: 0 auto;
background-color: white;
width: 800px;
height: 500px;
padding: 30px;
text-align: left;
}

/*---- navigation ----*/
#navigation {
border: 0;
list-style-type: none;
z-index: 1;
text-decoration: none;
font: 12px Helvetica, Arial, Geneva, sans-serif;
text-align: center;
color: #333;
display: inline;
padding-right: 50px;
text-align: center;
}

#navigation a {
text-decoration: none;
color: #75736b;
}

#navigation a:hover {
text-decoration: none;
color: #464540;
}
________________________________

and the horizontal navigation list part in my index.php:

<body>



<?
$selected[$p] = ' class="active"';
?>
<div id="navigation">
<ul="navigation">
<li<?=$selected['forside']?>><a href="?p=main">Forside</a></li>
<li<?=$selected['sortiment']?>><a href="?p=sortiment">Sortiment</a></li>
<li<?=$selected['bestil']?>><a href="?p=bestil">Bestil</a></li>
<li<?=$selected['omos']?>><a href="?p=omos">Om os</a></li>
<li<?=$selected['kontakt']?>><a href="?p=kontakt">Kontakt</a></li>
</ul>
</div>
<br>
<div class="content">
<? include("pages/".$p.".php"); ?>
</div>
</body>


I really don't see where I'm making a mistake, anyone care to explain? Your help is greatly appreciated.
I have a hunch that I'm doing something wrong with the classes/styles in the css file itself?

Thank you in advance,

Jakob
macjakob is offline   0 Reply With Quote
Old Oct 15, 2008, 05:51 PM   #2
ChicoWeb
macrumors 65816
 
ChicoWeb's Avatar
 
Join Date: Aug 2004
Location: California
You syntax is pretty jacked. Also, not sure what you're trying to do with the div and ul id's called the same. You either need to do.

#navigation ul

or

ul#navigation

AND, your UL html needs to be something like

<ul id="navigation">
__________________
ChicoWeb is offline   0 Reply With Quote
Old Oct 16, 2008, 09:22 AM   #3
macjakob
Thread Starter
macrumors newbie
 
Join Date: Feb 2006
Thank you ChicoWeb! Works now!
macjakob is offline   0 Reply With Quote

Reply
MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
PHP loses contact with MYSQL Starhorsepax Web Design and Development 7 May 3, 2011 02:41 PM
Having trouble with WD Element 2TB reformatting... EOTW Mac Peripherals 6 Jul 6, 2010 07:33 AM
CSS Help: Styling PHP Results sbryan Web Design and Development 3 Aug 26, 2009 03:41 PM
trouble with PHP and cookies MacLevel Web Design and Development (archive) 2 Jan 30, 2005 06:13 AM


All times are GMT -5. The time now is 09:01 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC