CSS Help And Javascript Help

  • Thread starter Thread starter Spock
  • 2 comments
  • 485 views

Spock

Not In My Name
Premium
Messages
3,341
Im currently redesigning my website and so far its coming along fine.
you can see what i have soo far here (its only a template right now)

http://free.hostultra.com/~mmx32/index.htm

But i am also having some problems posistioning an element on my nav bar

I Currently have my text to align left on the nav bar (with a 12px indentation of course) but i want the style selector to be on the far right of the nave bar.

I though a simple <div align="right">Select Stlye Code</div> within the nav bar div would work just fine, but it puts the selector directly under the nav bar, and left aligned.

i was thinking i could just split the nav bar into 2 div's a left side and a right side, but then i would have to make each 33.5% wide, which in my past experiences 2 divs centered with the same width % dont work well on other screen resolutions that what i design it on (1024).

So can anyone shed some light on this

__

But if noone can help me with that, i dont mind.
my real problem is the style changer itself.

i dont want to have a form that you have to press a submit button to change the style, i just want the style to change when you select a new stlye in the <select>/<option> box. like the quick style change at the bottom of gtp.( which is where i got the idea from).

and i thought it was going to be easy, but i couldnt find out how vBulletin does it. and even if i did, i have zero jscript experience.

so for any of you jscripters out there could you show me how to use the onChange attribut of the select tag with some javascript?
 
spock
Im currently redesigning my website and so far its coming along fine.
you can see what i have soo far here (its only a template right now)

http://free.hostultra.com/~mmx32/index.htm

But i am also having some problems posistioning an element on my nav bar

I Currently have my text to align left on the nav bar (with a 12px indentation of course) but i want the style selector to be on the far right of the nave bar.

I though a simple <div align="right">Select Stlye Code</div> within the nav bar div would work just fine, but it puts the selector directly under the nav bar, and left aligned.

i was thinking i could just split the nav bar into 2 div's a left side and a right side, but then i would have to make each 33.5% wide, which in my past experiences 2 divs centered with the same width % dont work well on other screen resolutions that what i design it on (1024).

So can anyone shed some light on this
Nest the syleChanger div inside the nav bar, and apply this CSS to it.
Code:
<div id="styleChanger">selct style code</div>

#styleChanger {
     float: right;
     }
Should work, hopefully&#8230;
 
Blake
Nest the syleChanger div inside the nav bar, and apply this CSS to it.
Code:
<div id="styleChanger">selct style code</div>

#styleChanger {
     float: right;
     }
Should work, hopefully&#8230;



That worked, i completely forgot about the float element and its usefullness.

Code:
<div id="navbar">
     <div id="links" style="float:left;"></div>
     <div id="stlyechanger" style="float:right;"></div>
</div>
 
Back