d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Trying To Add Colors Above Navi (wp) - 100fg
Add Reply New Topic New Poll
Member
Posts: 2,414
Joined: Mar 16 2012
Gold: 0.00
Nov 7 2014 05:08pm
Hi,

i've been googling and checking out source codes without succes. I'd love to add a bar with colors attached/above my black wordpress navigation. Just to add some nice colors to a pretty black and white theme.

Could someone guide me through this for 100fg? I'd love to learn this.

Example: (green is the background, white is the navigation)
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Nov 7 2014 06:31pm
i'm not a css expert, but can't you simply use empty divs with the colours you want?
.div1 {
background-color: #0000ff;
height: 10px;
width: 100px;
}
repeat for the colours you want, set the height/width as desired.
Member
Posts: 1,125
Joined: Jul 11 2007
Gold: 5.00
Nov 8 2014 12:08pm
for each item, such as <a></a>
<div></div>
<span></span>
<input></input> (depending on the type)
most all will accept inline css.
so add something like <div name="nav" style="height:10px;width:100px;background-color:#0000ff;margin-left:auto;margin-right:auto;margin-top:0px;"></div>
for the individual buttons or white area, do the same thing with the appropriate dimensions or if it is dynamic based on how many words there are.
so just put background color into each inline css style property of each tag for the blue red yellow blue green red.

there is no easier way to do this for a beginner.
Member
Posts: 1,945
Joined: Apr 19 2007
Gold: 1,978.90
Nov 12 2014 06:43pm
Add 6 divs in a container div, and a individual class for each colour

<div style="container">
<div class="top-bar blue">
</div>
<div class="top-bar red">
</div>
<div class="top-bar yellow">
</div>
<div class="top-bar blue">
</div>
<div class="top-bar green">
</div>
<div class="top-bar red">
</div>
</div>

css:

.top-bar {
float: left;
height: 5px;
width: 100px;
}

#container {
position: absolute;
top: 0px;
margin: 0 auto;
text-align: center;
}

.red {
background-color: red;
}

I'd imagine that should work fine
Member
Posts: 3,323
Joined: Apr 12 2009
Gold: 0.00
Dec 5 2014 02:32pm
I imagine you can just use a div like this

.divclass {
Background-color: #something you want;
height: what you want;
width: 100%
}

Just remember to put the div before you nav in your html
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll